mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-21 14:15:46 +00:00
Fixed namespace code generation for C++
The code generator was assuming all declarations for the current file sit in the same namepace. Now uses the "on demand" namespace switching we had for the forward declarations. Also fixed a bug related to namespace lookup. Change-Id: Ib54a3efbc752cbb9590302fa0707c0c73448db3d Tested: on Linux.
This commit is contained in:
@@ -7,7 +7,9 @@
|
||||
|
||||
namespace MyGame {
|
||||
namespace OtherNameSpace {
|
||||
|
||||
struct Unused;
|
||||
|
||||
} // namespace OtherNameSpace
|
||||
} // namespace MyGame
|
||||
|
||||
@@ -15,9 +17,13 @@ namespace MyGame {
|
||||
namespace Example {
|
||||
|
||||
struct Test;
|
||||
|
||||
struct TestSimpleTableWithEnum;
|
||||
|
||||
struct Vec3;
|
||||
|
||||
struct Stat;
|
||||
|
||||
struct Monster;
|
||||
|
||||
enum Color {
|
||||
|
||||
Reference in New Issue
Block a user