diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h index 32de9ca536..a273060fbb 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h @@ -49,7 +49,7 @@ protected: props.add (new ChoicePropertyComponent (architectureTypeValue, "Architecture", { "", "Native", "32-bit (-m32)", "64-bit (-m64)", "ARM v6", "ARM v7" }, - { "none" , "-march=native", "-m32", "-m64", "-march=armv6", "-march=armv7" }), + { { String() }, "-march=native", "-m32", "-m64", "-march=armv6", "-march=armv7" }), "Specifies the 32/64-bit architecture to use."); } @@ -70,15 +70,7 @@ protected: return "${JUCE_ARCH_LABEL}"; } - String getArchitectureTypeString() const - { - auto archString = architectureTypeValue.get(); - - if (archString == "none") - return {}; - - return archString; - } + String getArchitectureTypeString() const { return architectureTypeValue.get(); } //============================================================================== ValueWithDefault architectureTypeValue; diff --git a/modules/juce_data_structures/values/juce_ValueWithDefault.cpp b/modules/juce_data_structures/values/juce_ValueWithDefault.cpp index 4d86221528..cf7414d05b 100644 --- a/modules/juce_data_structures/values/juce_ValueWithDefault.cpp +++ b/modules/juce_data_structures/values/juce_ValueWithDefault.cpp @@ -52,17 +52,6 @@ public: expectEquals (vwd.get().toString(), String ("default")); } - beginTest ("empty property"); - { - ValueTree t ("root"); - t.setProperty ("testKey", {}, nullptr); - - ValueWithDefault vwd (t, "testKey", nullptr, "default"); - - expect (vwd.isUsingDefault()); - expectEquals (vwd.get().toString(), String ("default")); - } - beginTest ("non-empty property"); { ValueTree t ("root"); @@ -77,7 +66,6 @@ public: beginTest ("set default"); { ValueTree t ("root"); - t.setProperty ("testkey", {}, nullptr); ValueWithDefault vwd (t, "testkey", nullptr); vwd.setDefault ("default"); diff --git a/modules/juce_data_structures/values/juce_ValueWithDefault.h b/modules/juce_data_structures/values/juce_ValueWithDefault.h index d209a95013..f3b58d39ac 100644 --- a/modules/juce_data_structures/values/juce_ValueWithDefault.h +++ b/modules/juce_data_structures/values/juce_ValueWithDefault.h @@ -121,10 +121,10 @@ public: } } - /** Returns true if the property does not exist or is empty. */ + /** Returns true if the property does not exist in the referenced ValueTree. */ bool isUsingDefault() const { - return ! targetTree.hasProperty (targetProperty) || targetTree.getProperty (targetProperty).toString().isEmpty(); + return ! targetTree.hasProperty (targetProperty); } /** Removes the property from the referenced ValueTree. */