From 588f2ef2f51d7bdf209820bfb244034863601939 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 25 Oct 2009 04:35:19 -0400 Subject: Fixed many compiler warnings from g++ 4.4 --- src/format.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/format.h') diff --git a/src/format.h b/src/format.h index 03ed28c7..bc513f71 100644 --- a/src/format.h +++ b/src/format.h @@ -65,10 +65,7 @@ class format_t : public noncopyable { #define ELEMENT_ALIGN_LEFT 0x01 - enum kind_t { - STRING, - EXPR, - }; + enum kind_t { STRING, EXPR }; kind_t type; std::size_t min_width; @@ -89,7 +86,7 @@ class format_t : public noncopyable friend inline void mark_red(std::ostream& out, const element_t * elem) { out.setf(std::ios::left); out.width(0); - out << "\e[31m"; + out << "\033[31m"; if (elem->has_flags(ELEMENT_ALIGN_LEFT)) out << std::left; @@ -145,8 +142,9 @@ public: elem->dump(out); } - static string truncate(const unistring& str, std::size_t width, - const int account_abbrev_length = -1); + static string truncate(const unistring& str, + const std::size_t width, + const std::size_t account_abbrev_length = 0); }; #define FMT_PREFIX "fmt_" -- cgit v1.2.3