Fixed pre-declarations of included types in generated code.
This was harmless, but unnecessary. Change-Id: I1365a725e254d4ebbda081110a50277cb5118323 Tested: on Linux.
This commit is contained in:
parent
8128df7655
commit
e597ad8f0f
|
@ -777,8 +777,10 @@ std::string GenerateCPP(const Parser &parser,
|
|||
for (auto it = parser.structs_.vec.begin();
|
||||
it != parser.structs_.vec.end(); ++it) {
|
||||
auto &struct_def = **it;
|
||||
CheckNameSpace(struct_def, &code);
|
||||
code += "struct " + struct_def.name + ";\n\n";
|
||||
if (!struct_def.generated) {
|
||||
CheckNameSpace(struct_def, &code);
|
||||
code += "struct " + struct_def.name + ";\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Generate code for all the enum declarations.
|
||||
|
|
|
@ -5,14 +5,6 @@
|
|||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
namespace MyGame {
|
||||
namespace OtherNameSpace {
|
||||
|
||||
struct Unused;
|
||||
|
||||
} // namespace OtherNameSpace
|
||||
} // namespace MyGame
|
||||
|
||||
namespace MyGame {
|
||||
namespace Example {
|
||||
|
||||
|
|
Loading…
Reference in New Issue