From ac90586b153bc0fc976e4da76e82232a64afc8a9 Mon Sep 17 00:00:00 2001 From: john30 Date: Sun, 16 Apr 2017 17:00:31 +0200 Subject: [PATCH] fixed compiler warning --- src/lib/ebus/message.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/ebus/message.cpp b/src/lib/ebus/message.cpp index 715c1845..b468c68a 100644 --- a/src/lib/ebus/message.cpp +++ b/src/lib/ebus/message.cpp @@ -57,9 +57,12 @@ using std::endl; /** the maximum poll priority for a @a Message referred to by a @a Condition. */ #define POLL_PRIORITY_CONDITION 5 +/** the field name constant for the message level. */ +static const char* FIELNAME_LEVEL = "level"; + /** the known full length field names. */ static const char* knownFieldNamesFull[] = { - "type", "circuit", "level", "name", "comment", "qq", "zz", "pbsb", "id", "fields", + "type", "circuit", FIELNAME_LEVEL, "name", "comment", "qq", "zz", "pbsb", "id", "fields", }; /** the known full length field names. */ @@ -849,7 +852,7 @@ void Message::dump(ostream& output, vector* fieldNames, bool withConditi bool first = true; if (fieldNames == NULL) { for (auto fieldName : knownFieldNamesFull) { - if (fieldName == "level") { + if (fieldName == FIELNAME_LEVEL) { continue; // access level not included in default dump format } if (first) {