From c9d7299e6586fa7baa5badffc6f0c07d6d91c679 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 12 Dec 2015 06:13:48 +0100 Subject: DEVTOOLS: Cleanup code. --- devtools/create_project/xcode.cpp | 2 +- devtools/create_project/xcode.h | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'devtools') diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 27cf88e837..534b67f409 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -1042,7 +1042,7 @@ std::string XcodeProvider::writeProperty(const std::string &variable, Property & if (settings.size() > 1 || (prop._flags & SettingsSingleItem)) output += (flags & SettingsSingleItem ? " " : "\t\t\t\t"); - output += writeSetting((*setting).first, (*setting).second); + output += writeSetting(setting->first, setting->second); // The combination of SettingsAsList, and SettingsSingleItem should use "," and not ";" (i.e children // in PBXGroup, so we special case that case here. diff --git a/devtools/create_project/xcode.h b/devtools/create_project/xcode.h index 3f037ebfc4..e6295ccf7b 100644 --- a/devtools/create_project/xcode.h +++ b/devtools/create_project/xcode.h @@ -120,15 +120,11 @@ private: // Constructs a simple Property explicit Property(std::string name, std::string value = "", std::string comment = "", int flgs = 0, int indent = 0, bool order = false) : _flags(flgs), _hasOrder(order) { - Setting setting(value, comment, _flags, indent); - - _settings[name] = setting; + _settings[name] = Setting(value, comment, _flags, indent); } Property(std::string name, ValueList values, int flgs = 0, int indent = 0, bool order = false) : _flags(flgs), _hasOrder(order) { - Setting setting(values, _flags, indent); - - _settings[name] = setting; + _settings[name] = Setting(values, _flags, indent); } OrderedSettingList getOrderedSettingList() { @@ -188,10 +184,10 @@ private: // Write each property for (PropertyList::iterator property = _properties.begin(); property != _properties.end(); ++property) { - if ((*property).first == "isa") + if (property->first == "isa") continue; - output += _parent->writeProperty((*property).first, (*property).second, flags); + output += _parent->writeProperty(property->first, property->second, flags); } if (flags & SettingsAsList) @@ -212,8 +208,7 @@ private: assert(!_properties["isa"]._settings.empty()); SettingList::iterator it = _properties["isa"]._settings.begin(); - - return (*it).first; + return it->first; } }; -- cgit v1.2.3