mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-25 02:06:10 +00:00
Fixed compile errors on Windows
This commit is contained in:
@@ -45,6 +45,10 @@ class BaseGenerator {
|
|||||||
namespace_dir_(BaseGenerator::NamespaceDir(parser, path)){};
|
namespace_dir_(BaseGenerator::NamespaceDir(parser, path)){};
|
||||||
virtual ~BaseGenerator(){};
|
virtual ~BaseGenerator(){};
|
||||||
|
|
||||||
|
// No copy/assign.
|
||||||
|
BaseGenerator &operator=(const BaseGenerator &);
|
||||||
|
BaseGenerator(const BaseGenerator &);
|
||||||
|
|
||||||
const char *FlatBuffersGeneratedWarning() {
|
const char *FlatBuffersGeneratedWarning() {
|
||||||
return "automatically generated by the FlatBuffers compiler,"
|
return "automatically generated by the FlatBuffers compiler,"
|
||||||
" do not modify\n\n";
|
" do not modify\n\n";
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ CheckedError Parser::Next() {
|
|||||||
return Error(
|
return Error(
|
||||||
"illegal Unicode sequence (multiple high surrogates)");
|
"illegal Unicode sequence (multiple high surrogates)");
|
||||||
} else {
|
} else {
|
||||||
unicode_high_surrogate = val;
|
unicode_high_surrogate = static_cast<int>(val);
|
||||||
}
|
}
|
||||||
} else if (val >= 0xDC00 && val <= 0xDFFF) {
|
} else if (val >= 0xDC00 && val <= 0xDFFF) {
|
||||||
if (unicode_high_surrogate == -1) {
|
if (unicode_high_surrogate == -1) {
|
||||||
@@ -2001,14 +2001,14 @@ flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<
|
|||||||
Definition::SerializeAttributes(FlatBufferBuilder *builder,
|
Definition::SerializeAttributes(FlatBufferBuilder *builder,
|
||||||
const Parser &parser) const {
|
const Parser &parser) const {
|
||||||
std::vector<flatbuffers::Offset<reflection::KeyValue>> attrs;
|
std::vector<flatbuffers::Offset<reflection::KeyValue>> attrs;
|
||||||
for (auto kv : attributes.dict) {
|
for (auto kv = attributes.dict.begin(); kv != attributes.dict.end(); ++kv) {
|
||||||
auto it = parser.known_attributes_.find(kv.first);
|
auto it = parser.known_attributes_.find(kv->first);
|
||||||
assert(it != parser.known_attributes_.end());
|
assert(it != parser.known_attributes_.end());
|
||||||
if (!it->second) { // Custom attribute.
|
if (!it->second) { // Custom attribute.
|
||||||
attrs.push_back(
|
attrs.push_back(
|
||||||
reflection::CreateKeyValue(*builder, builder->CreateString(kv.first),
|
reflection::CreateKeyValue(*builder, builder->CreateString(kv->first),
|
||||||
builder->CreateString(
|
builder->CreateString(
|
||||||
kv.second->constant)));
|
kv->second->constant)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (attrs.size()) {
|
if (attrs.size()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user