From 45b49f84d15e0c995bbceb068fe889c667ea30a1 Mon Sep 17 00:00:00 2001 From: jules Date: Sun, 5 Jan 2014 16:42:37 +0000 Subject: [PATCH] Introjucer: moved the definition of a BinaryData constant into the header file. --- extras/Demo/JuceLibraryCode/BinaryData.cpp | 2 -- extras/Demo/JuceLibraryCode/BinaryData.h | 2 +- extras/Introjucer/JuceLibraryCode/BinaryData.cpp | 2 -- extras/Introjucer/JuceLibraryCode/BinaryData.h | 2 +- .../Introjucer/Source/Project Saving/jucer_ResourceFile.cpp | 4 +--- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/extras/Demo/JuceLibraryCode/BinaryData.cpp b/extras/Demo/JuceLibraryCode/BinaryData.cpp index a9b085973a..58220789a8 100644 --- a/extras/Demo/JuceLibraryCode/BinaryData.cpp +++ b/extras/Demo/JuceLibraryCode/BinaryData.cpp @@ -5777,8 +5777,6 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw return 0; } -const int namedResourceListSize = 9; - const char* namedResourceList[] = { "brushed_aluminium_png", diff --git a/extras/Demo/JuceLibraryCode/BinaryData.h b/extras/Demo/JuceLibraryCode/BinaryData.h index ad45fc8cee..d0418b48a3 100644 --- a/extras/Demo/JuceLibraryCode/BinaryData.h +++ b/extras/Demo/JuceLibraryCode/BinaryData.h @@ -40,7 +40,7 @@ namespace BinaryData extern const char* namedResourceList[]; // Number of elements in the namedResourceList array. - extern const int namedResourceListSize; + const int namedResourceListSize = 9; // If you provide the name of one of the binary resource variables above, this function will // return the corresponding data and its size (or a null pointer if the name isn't found). diff --git a/extras/Introjucer/JuceLibraryCode/BinaryData.cpp b/extras/Introjucer/JuceLibraryCode/BinaryData.cpp index 09655704d4..2aad9aa38e 100644 --- a/extras/Introjucer/JuceLibraryCode/BinaryData.cpp +++ b/extras/Introjucer/JuceLibraryCode/BinaryData.cpp @@ -1244,8 +1244,6 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw return 0; } -const int namedResourceListSize = 22; - const char* namedResourceList[] = { "AudioPluginXCodeScript_txt", diff --git a/extras/Introjucer/JuceLibraryCode/BinaryData.h b/extras/Introjucer/JuceLibraryCode/BinaryData.h index c86cee4a65..e38ca4eb4f 100644 --- a/extras/Introjucer/JuceLibraryCode/BinaryData.h +++ b/extras/Introjucer/JuceLibraryCode/BinaryData.h @@ -79,7 +79,7 @@ namespace BinaryData extern const char* namedResourceList[]; // Number of elements in the namedResourceList array. - extern const int namedResourceListSize; + const int namedResourceListSize = 22; // If you provide the name of one of the binary resource variables above, this function will // return the corresponding data and its size (or a null pointer if the name isn't found). diff --git a/extras/Introjucer/Source/Project Saving/jucer_ResourceFile.cpp b/extras/Introjucer/Source/Project Saving/jucer_ResourceFile.cpp index 61725edc67..b7d93f7467 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ResourceFile.cpp +++ b/extras/Introjucer/Source/Project Saving/jucer_ResourceFile.cpp @@ -163,7 +163,7 @@ bool ResourceFile::writeHeader (MemoryOutputStream& header) << " extern const char* namedResourceList[];" << newLine << newLine << " // Number of elements in the namedResourceList array." << newLine - << " extern const int namedResourceListSize;" << newLine + << " const int namedResourceListSize = " << files.size() << ";" << newLine << newLine << " // If you provide the name of one of the binary resource variables above, this function will" << newLine << " // return the corresponding data and its size (or a null pointer if the name isn't found)." << newLine @@ -252,8 +252,6 @@ bool ResourceFile::writeCpp (MemoryOutputStream& cpp, const File& headerFile, in << " return 0;" << newLine << "}" << newLine << newLine - << "const int namedResourceListSize = " << files.size() << ";" << newLine - << newLine << "const char* namedResourceList[] =" << newLine << "{" << newLine;