From 5e4c4a4bdcd749be0dff7c9c492735ef3a8585aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Wed, 25 Jun 2014 13:33:19 +0200 Subject: [PATCH] Renamed the inner types --- JsonGeneratorTests/JsonArray.h | 12 ++++++------ JsonGeneratorTests/JsonObjectBase.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/JsonGeneratorTests/JsonArray.h b/JsonGeneratorTests/JsonArray.h index 80e7b61b..a960b1ef 100644 --- a/JsonGeneratorTests/JsonArray.h +++ b/JsonGeneratorTests/JsonArray.h @@ -19,28 +19,28 @@ public: void add(const char* value) { - JsonObjectValue v; + ObjectValue v; v.string = value; addItem(JSON_STRING, v); } void add(double value) { - JsonObjectValue v; + ObjectValue v; v.number = value; addItem(JSON_NUMBER, v); } void add(bool value) { - JsonObjectValue v; + ObjectValue v; v.boolean = value; addItem(JSON_BOOLEAN, v); } void add(JsonObjectBase& value) { - JsonObjectValue v; + ObjectValue v; v.object = &value; addItem(JSON_OBJECT, v); } @@ -52,7 +52,7 @@ public: } private: - JsonObject items[N]; + ObjectContainer items[N]; int itemCount; virtual void writeTo(StringBuilder& sb) @@ -68,7 +68,7 @@ private: sb.append("]"); } - void addItem(JsonObjectType type, JsonObjectValue value) + void addItem(ObjectType type, ObjectValue value) { if (itemCount >= N) return; diff --git a/JsonGeneratorTests/JsonObjectBase.h b/JsonGeneratorTests/JsonObjectBase.h index 2908f0c6..e55627b8 100644 --- a/JsonGeneratorTests/JsonObjectBase.h +++ b/JsonGeneratorTests/JsonObjectBase.h @@ -16,7 +16,7 @@ protected: virtual void writeTo(StringBuilder& sb) = 0; - enum JsonObjectType + enum ObjectType { JSON_STRING, JSON_NUMBER, @@ -24,7 +24,7 @@ protected: JSON_OBJECT, }; - union JsonObjectValue + union ObjectValue { const char* string; double number; @@ -32,13 +32,13 @@ protected: JsonObjectBase* object; }; - struct JsonObject + struct ObjectContainer { - JsonObjectType type; - JsonObjectValue value; + ObjectType type; + ObjectValue value; }; - void writeObjectTo(JsonObject& obj, StringBuilder& sb) + void writeObjectTo(ObjectContainer& obj, StringBuilder& sb) { switch (obj.type) {