Fixed clang-tidy warnings.

Change-Id: Ib94ef29254c116b60e4ff298baa2ce323ac9655c
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2017-08-07 15:33:36 -07:00
parent 917ff81b46
commit 7fe281295f
4 changed files with 5 additions and 5 deletions

View File

@@ -1772,7 +1772,7 @@ class CppGenerator : public BaseGenerator {
// For optional fields, check to see if there actually is any data
// in _o->field before attempting to access it.
if (!field.required) {
code = value + ".size() ? " + code + " : 0";
code = value + ".empty() ? 0 : " + code;
}
break;
}