Browse Source

Removed some duplicated code.

tags/2021-05-28
jules 12 years ago
parent
commit
3fe01cdca7
2 changed files with 3 additions and 34 deletions
  1. +0
    -29
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h
  2. +3
    -5
      extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp

+ 0
- 29
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h View File

@@ -857,35 +857,6 @@ private:
output << "\t};\n\trootObject = " << createID ("__root") << ";\n}\n";
}
static void addPlistDictionaryKey (XmlElement* xml, const String& key, const String& value)
{
forEachXmlChildElementWithTagName (*xml, e, "key")
{
if (e->getAllSubText().trim().equalsIgnoreCase (key))
{
if (e->getNextElement() != nullptr && e->getNextElement()->hasTagName ("key"))
{
// try to fix broken plist format..
xml->removeChildElement (e, true);
break;
}
else
{
return; // (value already exists)
}
}
}
xml->createNewChildElement ("key") ->addTextElement (key);
xml->createNewChildElement ("string")->addTextElement (value);
}
static void addPlistDictionaryKeyBool (XmlElement* xml, const String& key, const bool value)
{
xml->createNewChildElement ("key")->addTextElement (key);
xml->createNewChildElement (value ? "true" : "false");
}
String addBuildFile (const String& path, const String& fileRefID, bool addToSourceBuildPhase, bool inhibitWarnings) const
{
String fileID (createID (path + "buildref"));


+ 3
- 5
extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp View File

@@ -183,14 +183,12 @@ void addPlistDictionaryKey (XmlElement* xml, const String& key, const String& va
xml->removeChildElement (e, true);
break;
}
else
{
return; // (value already exists)
}
return; // (value already exists)
}
}
xml->createNewChildElement ("key") ->addTextElement (key);
xml->createNewChildElement ("key")->addTextElement (key);
xml->createNewChildElement ("string")->addTextElement (value);
}


Loading…
Cancel
Save