diff --git a/build_ide/VS2010/flatc.vcxproj b/build_ide/VS2010/flatc.vcxproj
index 31cd01345..5aef2384a 100755
--- a/build_ide/VS2010/flatc.vcxproj
+++ b/build_ide/VS2010/flatc.vcxproj
@@ -81,7 +81,7 @@
- ../../include;%(AdditionalIncludeDirectories)
+ ../../include;../../grpc;%(AdditionalIncludeDirectories)
EnableFastChecks
CompileAsCpp
ProgramDatabase
@@ -127,7 +127,7 @@
- ../../include;%(AdditionalIncludeDirectories)
+ ../../include;../../grpc;%(AdditionalIncludeDirectories)
EnableFastChecks
CompileAsCpp
ProgramDatabase
@@ -173,7 +173,7 @@
- ../../include;%(AdditionalIncludeDirectories)
+ ../../include;../../grpc;%(AdditionalIncludeDirectories)
CompileAsCpp
Sync
AnySuitable
@@ -219,7 +219,7 @@
- ../../include;%(AdditionalIncludeDirectories)
+ ../../include;../../grpc;%(AdditionalIncludeDirectories)
CompileAsCpp
Sync
AnySuitable
@@ -263,6 +263,8 @@
+
+
diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h
index 01ab6db04..4cf1c0b48 100644
--- a/include/flatbuffers/flatbuffers.h
+++ b/include/flatbuffers/flatbuffers.h
@@ -1351,7 +1351,7 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
size_t GetComputedSize() const {
uintptr_t size = upper_bound_ - buf_;
// Align the size to uoffset_t
- size = (size - 1 + sizeof(uoffset_t)) & -uintptr_t(sizeof(uoffset_t));
+ size = (size - 1 + sizeof(uoffset_t)) & ~(sizeof(uoffset_t) - 1);
return (buf_ + size > end_) ? 0 : size;
}
#endif
diff --git a/src/idl_gen_general.cpp b/src/idl_gen_general.cpp
index 34ca2c3e4..7e8e8c577 100644
--- a/src/idl_gen_general.cpp
+++ b/src/idl_gen_general.cpp
@@ -197,6 +197,7 @@ class GeneralGenerator : public BaseGenerator {
lang_(language_parameters[parser_.opts.lang]) {
assert(parser_.opts.lang <= IDLOptions::kMAX);
};
+ GeneralGenerator &operator=(const GeneralGenerator &);
bool generate() {
std::string one_file_code;
@@ -235,7 +236,7 @@ class GeneralGenerator : public BaseGenerator {
// Save out the generated code for a single class while adding
// declaration boilerplate.
- bool SaveType(const std::string &defname, const Namespace &ns,
+ bool SaveType(const std::string &defname, const Namespace &ns,
const std::string &classcode, bool needs_includes) {
if (!classcode.length()) return true;
@@ -1133,7 +1134,7 @@ void GenStruct(StructDef &struct_def, std::string *code_ptr) {
// Java does not need the closing semi-colon on class definitions.
code += (lang_.language != IDLOptions::kJava) ? ";" : "";
code += "\n\n";
-}
+}
const LanguageParameters & lang_;
};
} // namespace general
diff --git a/src/idl_gen_grpc.cpp b/src/idl_gen_grpc.cpp
index 2bf0e911d..6ada3e873 100644
--- a/src/idl_gen_grpc.cpp
+++ b/src/idl_gen_grpc.cpp
@@ -137,6 +137,7 @@ class FlatBufFile : public grpc_cpp_generator::File {
public:
FlatBufFile(const Parser &parser, const std::string &file_name)
: parser_(parser), file_name_(file_name) {}
+ FlatBufFile &operator=(const FlatBufFile &);
std::string filename() const { return file_name_; }
std::string filename_without_ext() const {
diff --git a/tests/test.cpp b/tests/test.cpp
index 402843a6f..70a07d480 100644
--- a/tests/test.cpp
+++ b/tests/test.cpp
@@ -124,7 +124,9 @@ flatbuffers::unique_ptr_t CreateFlatBufferTest(std::string &buffer) {
});
// Creating vectors of strings in one convenient call.
- std::vector names2 = { "jane", "mary" };
+ std::vector names2;
+ names2.push_back("jane");
+ names2.push_back("mary");
auto vecofstrings2 = builder.CreateVectorOfStrings(names2);
// Create an array of sorted tables, can be used with binary search when read:
@@ -855,7 +857,7 @@ void ValueTest() {
// Test conversion functions.
TEST_EQ(FloatCompare(TestValue("{ Y:cos(rad(180)) }","float"), -1), true);
-
+
// Test negative hex constant.
TEST_EQ(TestValue("{ Y:-0x80 }","int") == -128, true);
}