From 2b2c0d5bbfdbb3a868ed54ad4b5a087035abafdd Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Tue, 14 Oct 2014 12:02:03 -0700 Subject: [PATCH] Fix warnings found from clang --- rct/Rct.cpp | 2 +- rct/String.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rct/Rct.cpp b/rct/Rct.cpp index 0f5097a..c28ffc8 100644 --- a/rct/Rct.cpp +++ b/rct/Rct.cpp @@ -412,7 +412,7 @@ const char *colors[] = { String colorize(const String &string, AnsiColor color, int from, int len) { - assert(from <= size()); + assert(from <= string.size()); assert(from >= 0); if (len == -1) { len = string.size() - from; diff --git a/rct/String.h b/rct/String.h index 914fefb..62c0483 100644 --- a/rct/String.h +++ b/rct/String.h @@ -768,12 +768,12 @@ class String std::string mString; }; -inline const bool operator==(const char *l, const String &r) +inline bool operator==(const char *l, const String &r) { return r.operator==(l); } -inline const bool operator!=(const char *l, const String &r) +inline bool operator!=(const char *l, const String &r) { return r.operator!=(l); }