From 38a1e959790af636d51434ae3486da40c055cde3 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 13 Jul 2016 15:15:03 +0200 Subject: [PATCH] base: add 'String::print' method This way, we can conveniently output strings without calling the string() method. --- repos/base/include/base/output.h | 1 - repos/base/include/util/string.h | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/repos/base/include/base/output.h b/repos/base/include/base/output.h index 5ab087ea6f..8a69af56a6 100644 --- a/repos/base/include/base/output.h +++ b/repos/base/include/base/output.h @@ -14,7 +14,6 @@ #ifndef _INCLUDE__BASE__OUTPUT_H_ #define _INCLUDE__BASE__OUTPUT_H_ -#include #include namespace Genode { struct Output; } diff --git a/repos/base/include/util/string.h b/repos/base/include/util/string.h index 08cc28840f..f8aa266ada 100644 --- a/repos/base/include/util/string.h +++ b/repos/base/include/util/string.h @@ -16,6 +16,7 @@ #define _INCLUDE__UTIL__STRING_H_ #include +#include #include #include @@ -557,6 +558,8 @@ class Genode::String { return strcmp(string(), other.string()) != 0; } + + void print(Output &out) const { Genode::print(out, string()); } }; #endif /* _INCLUDE__UTIL__STRING_H_ */