summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorWouter van Oortmerssen <wvo@google.com>2015-11-25 16:48:28 -0800
committerWouter van Oortmerssen <wvo@google.com>2015-12-02 11:12:39 -0800
commitb7d8c2af1a31bc8277884b417656236cc5f87e68 (patch)
tree36fc03d4adf34bf11be478c0ec82a817d1701164 /samples
parent1075c80e8aa85462893a1996b947da04d9fc6f85 (diff)
downloadflatbuffers-b7d8c2af1a31bc8277884b417656236cc5f87e68.tar.gz
flatbuffers-b7d8c2af1a31bc8277884b417656236cc5f87e68.tar.bz2
flatbuffers-b7d8c2af1a31bc8277884b417656236cc5f87e68.zip
Made generated C++ code respect gcc -Werror=shadow.
Change-Id: I17de0bcc462770124227a9967e2aab620467f6eb Tested: on Linux.
Diffstat (limited to 'samples')
-rw-r--r--samples/monster_generated.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/samples/monster_generated.h b/samples/monster_generated.h
index 878a7688..854e712e 100644
--- a/samples/monster_generated.h
+++ b/samples/monster_generated.h
@@ -46,15 +46,15 @@ MANUALLY_ALIGNED_STRUCT(4) Vec3 FLATBUFFERS_FINAL_CLASS {
float z_;
public:
- Vec3(float x, float y, float z)
- : x_(flatbuffers::EndianScalar(x)), y_(flatbuffers::EndianScalar(y)), z_(flatbuffers::EndianScalar(z)) { }
+ Vec3(float _x, float _y, float _z)
+ : x_(flatbuffers::EndianScalar(_x)), y_(flatbuffers::EndianScalar(_y)), z_(flatbuffers::EndianScalar(_z)) { }
float x() const { return flatbuffers::EndianScalar(x_); }
- void mutate_x(float x) { flatbuffers::WriteScalar(&x_, x); }
+ void mutate_x(float _x) { flatbuffers::WriteScalar(&x_, _x); }
float y() const { return flatbuffers::EndianScalar(y_); }
- void mutate_y(float y) { flatbuffers::WriteScalar(&y_, y); }
+ void mutate_y(float _y) { flatbuffers::WriteScalar(&y_, _y); }
float z() const { return flatbuffers::EndianScalar(z_); }
- void mutate_z(float z) { flatbuffers::WriteScalar(&z_, z); }
+ void mutate_z(float _z) { flatbuffers::WriteScalar(&z_, _z); }
};
STRUCT_END(Vec3, 12);
@@ -62,15 +62,15 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
const Vec3 *pos() const { return GetStruct<const Vec3 *>(4); }
Vec3 *mutable_pos() { return GetStruct<Vec3 *>(4); }
int16_t mana() const { return GetField<int16_t>(6, 150); }
- bool mutate_mana(int16_t mana) { return SetField(6, mana); }
+ bool mutate_mana(int16_t _mana) { return SetField(6, _mana); }
int16_t hp() const { return GetField<int16_t>(8, 100); }
- bool mutate_hp(int16_t hp) { return SetField(8, hp); }
+ bool mutate_hp(int16_t _hp) { return SetField(8, _hp); }
const flatbuffers::String *name() const { return GetPointer<const flatbuffers::String *>(10); }
flatbuffers::String *mutable_name() { return GetPointer<flatbuffers::String *>(10); }
const flatbuffers::Vector<uint8_t> *inventory() const { return GetPointer<const flatbuffers::Vector<uint8_t> *>(14); }
flatbuffers::Vector<uint8_t> *mutable_inventory() { return GetPointer<flatbuffers::Vector<uint8_t> *>(14); }
Color color() const { return static_cast<Color>(GetField<int8_t>(16, 2)); }
- bool mutate_color(Color color) { return SetField(16, static_cast<int8_t>(color)); }
+ bool mutate_color(Color _color) { return SetField(16, static_cast<int8_t>(_color)); }
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<Vec3>(verifier, 4 /* pos */) &&