From 3d9bff2f00e9992711b2934441da8671286a8e04 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 23 Feb 2015 13:04:29 +0000 Subject: [PATCH] Minor update to binarybuilder to allow non-lowercase symbol names. --- extras/binarybuilder/Source/Main.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/extras/binarybuilder/Source/Main.cpp b/extras/binarybuilder/Source/Main.cpp index e1e6aa9283..86e57de00b 100644 --- a/extras/binarybuilder/Source/Main.cpp +++ b/extras/binarybuilder/Source/Main.cpp @@ -21,10 +21,10 @@ static int addFile (const File& file, MemoryBlock mb; file.loadFileAsData (mb); - const String name (file.getFileName().toLowerCase() + const String name (file.getFileName() .replaceCharacter (' ', '_') .replaceCharacter ('.', '_') - .retainCharacters ("abcdefghijklmnopqrstuvwxyz_0123456789")); + .retainCharacters ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789")); std::cout << "Adding " << name << ": " << (int) mb.getSize() << " bytes" << std::endl; @@ -71,7 +71,7 @@ static bool isHiddenFile (const File& f, const File& root) //============================================================================== int main (int argc, char* argv[]) { - std::cout << "\n BinaryBuilder! Copyright 2007 by Julian Storer - www.juce.com\n\n"; + std::cout << std::endl << " BinaryBuilder! Visit www.juce.com for more info." << std::endl; if (argc < 4 || argc > 5) { @@ -120,7 +120,7 @@ int main (int argc, char* argv[]) << " from files in " << sourceDirectory.getFullPathName() << "..." << std::endl << std::endl; - Array files; + Array files; sourceDirectory.findChildFiles (files, File::findFiles, true, (argc > 4) ? argv[4] : "*"); @@ -134,18 +134,18 @@ int main (int argc, char* argv[]) headerFile.deleteFile(); cppFile.deleteFile(); - ScopedPointer header (headerFile.createOutputStream()); + ScopedPointer header (headerFile.createOutputStream()); - if (header == 0) + if (header == nullptr) { std::cout << "Couldn't open " << headerFile.getFullPathName() << " for writing" << std::endl << std::endl; return 0; } - ScopedPointer cpp (cppFile.createOutputStream()); + ScopedPointer cpp (cppFile.createOutputStream()); - if (cpp == 0) + if (cpp == nullptr) { std::cout << "Couldn't open " << cppFile.getFullPathName() << " for writing" << std::endl << std::endl; @@ -190,8 +190,8 @@ int main (int argc, char* argv[]) *header << "}\r\n\r\n" "#endif\r\n"; - header = 0; - cpp = 0; + header = nullptr; + cpp = nullptr; std::cout << std::endl << " Total size of binary data: " << totalBytes << " bytes" << std::endl;