1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Formatting: Use nested namespace definitions

This commit is contained in:
Anthony Nicholls 2023-10-06 08:59:50 +01:00
parent 90c458d92e
commit 158220ddfa
142 changed files with 394 additions and 796 deletions

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
static const char* resourceFileIdentifierString = "JUCER_BINARY_RESOURCE";
//==============================================================================
@ -285,5 +284,5 @@ namespace build_tools
return { Result::ok(), std::move (filesCreated) };
}
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
class ResourceFile
{
public:
@ -70,5 +69,5 @@ namespace build_tools
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ResourceFile)
};
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
void overwriteFileIfDifferentOrThrow (const File& file, const MemoryOutputStream& newData)
{
if (! overwriteFileWithNewDataIfDifferent (file, newData))
@ -355,5 +354,5 @@ namespace build_tools
writer (mo);
overwriteFileIfDifferentOrThrow (file, mo);
}
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
void overwriteFileIfDifferentOrThrow (const File& file, const MemoryOutputStream& newData);
void overwriteFileIfDifferentOrThrow (const File& file, const String& newData);
@ -82,5 +81,5 @@ namespace build_tools
String getRelativePathFrom (const File& file, const File& sourceFolder);
void writeStreamToFile (const File& file, const std::function<void (MemoryOutputStream&)>& writer);
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
static bool isReservedKeyword (String::CharPointerType token, const int tokenLength) noexcept
{
static const char* const keywords2Char[] =
@ -202,5 +201,5 @@ namespace build_tools
}
}
}
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce:: build_tools
{
String EntitlementOptions::getEntitlementsFileContent() const
{
String content =
@ -132,5 +131,5 @@ namespace build_tools
return entitlements;
}
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
struct EntitlementOptions final
{
String getEntitlementsFileContent() const;
@ -61,5 +60,5 @@ namespace build_tools
private:
StringPairArray getEntitlements() const;
};
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
Array<Drawable*> asArray (const Icons& icons)
{
Array<Drawable*> result;
@ -495,5 +494,5 @@ namespace build_tools
return { assets, targetFolder, RelativePath::buildTargetFolder };
}
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
struct Icons
{
std::unique_ptr<Drawable> small;
@ -45,5 +44,5 @@ namespace build_tools
RelativePath createXcassetsFolderFromIcons (const Icons& icons,
const File& targetFolder,
String projectFilenameRootString);
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
//==============================================================================
static XmlElement* getKeyWithName (XmlElement& xml, const String& key)
{
@ -374,5 +373,5 @@ namespace build_tools
return { plistKey, plistEntry };
}
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
class PlistOptions final
{
public:
@ -103,5 +102,5 @@ namespace build_tools
Array<XmlElement> createExtraAudioUnitTargetPlistOptions() const;
Array<XmlElement> createExtraAudioUnitV3TargetPlistOptions() const;
};
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
//==============================================================================
class ProjectType
{
@ -321,5 +320,5 @@ namespace build_tools
return Array<ProjectType*> (&guiApp, &consoleApp, &staticLib, &dll, &plugin, &araplugin);
}
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
//==============================================================================
/** Manipulates a cross-platform partial file path. (Needed because File is designed
for absolute paths on the active OS)
@ -125,5 +124,5 @@ namespace build_tools
return currentWorkingDirectory.getChildFile (path);
}
};
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
uint64 calculateStreamHashCode (InputStream& in)
{
uint64 t = 0;
@ -87,5 +86,5 @@ namespace build_tools
const char* const utf8 = newData.toUTF8();
return overwriteFileWithNewDataIfDifferent (file, utf8, strlen (utf8));
}
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce:: build_tools
{
uint64 calculateStreamHashCode (InputStream& in);
uint64 calculateFileHashCode (const File& file);
uint64 calculateMemoryHashCode (const void* data, size_t numBytes);
@ -34,5 +33,5 @@ namespace build_tools
bool overwriteFileWithNewDataIfDifferent (const File& file, const void* data, size_t numBytes);
bool overwriteFileWithNewDataIfDifferent (const File& file, const MemoryOutputStream& newData);
bool overwriteFileWithNewDataIfDifferent (const File& file, const String& newData);
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
static String getCommaSeparatedVersionNumber (const String& version)
{
auto versionParts = StringArray::fromTokens (version, ",.", "");
@ -93,5 +92,5 @@ namespace build_tools
overwriteFileIfDifferentOrThrow (resourceRcFile, mo);
}
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
class ResourceRcOptions final
{
public:
@ -39,5 +38,5 @@ namespace build_tools
String projectName;
File icon;
};
}
}
} // namespace juce::build_tools

View file

@ -23,10 +23,9 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
StringArray getVersionSegments (StringRef p)
{
auto segments = StringArray::fromTokens (p, ",.", "");
@ -56,5 +55,5 @@ namespace build_tools
{
return "0x" + String::toHexString (getVersionAsHexInteger (versionString));
}
}
}
} // namespace juce::build_tools

View file

@ -23,15 +23,14 @@
==============================================================================
*/
namespace juce
{
namespace build_tools
namespace juce::build_tools
{
StringArray getVersionSegments (StringRef p);
int getVersionAsHexIntegerFromParts (const StringArray& versionString);
int getVersionAsHexInteger (StringRef versionString);
String getVersionAsHex (StringRef versionString);
}
}
} // namespace juce::build_tools