From b341356be10ab6860a021e0c4da4a1158f40ca8f Mon Sep 17 00:00:00 2001 From: Gil Date: Wed, 17 Jan 2018 10:47:18 -0800 Subject: Fix CMake build and lint warnings in field_value.cc (#677) Fixes these cpplint warnings: Firestore/core/src/firebase/firestore/model/field_value.cc:162: Semicolon defining empty statement. Use {} instead. [whitespace/semicolon] [5] Firestore/core/src/firebase/firestore/model/field_value.cc:170: Semicolon defining empty statement. Use {} instead. [whitespace/semicolon] [5] Firestore/core/src/firebase/firestore/model/field_value.cc:126: Add #include for swap [build/include_what_you_use] [4] --- Firestore/core/src/firebase/firestore/model/field_value.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Firestore/core/src/firebase/firestore/model/field_value.cc') diff --git a/Firestore/core/src/firebase/firestore/model/field_value.cc b/Firestore/core/src/firebase/firestore/model/field_value.cc index 5a19549..45886bf 100644 --- a/Firestore/core/src/firebase/firestore/model/field_value.cc +++ b/Firestore/core/src/firebase/firestore/model/field_value.cc @@ -18,6 +18,7 @@ #include #include +#include #include #include "Firestore/core/src/firebase/firestore/util/firebase_assert.h" @@ -159,7 +160,7 @@ void FieldValue::SwitchTo(const Type type) { case Type::Array: array_value_.~vector(); break; - default:; // The other types where there is nothing to worry about. + default: {} // The other types where there is nothing to worry about. } tag_ = type; // Must call constructor explicitly for any non-POD type to initialize. @@ -167,7 +168,7 @@ void FieldValue::SwitchTo(const Type type) { case Type::Array: new (&array_value_) std::vector(); break; - default:; // The other types where there is nothing to worry about. + default: {} // The other types where there is nothing to worry about. } } -- cgit v1.2.3