Skip to content
Snippets Groups Projects
Commit a959216f authored by Oliver Bock's avatar Oliver Bock
Browse files

(On the way to) fixing that nasty text resource bug

* Arrays must not be declared extern (would then be defined twice)
* Arrays must not be declared const (would have internal linkage)

Still doesn't work reliably...
parent 3d9d9818
No related branches found
No related tags found
No related merge requests found
...@@ -64,17 +64,17 @@ void ResourceCompiler::compile() ...@@ -64,17 +64,17 @@ void ResourceCompiler::compile()
// write code file contents (remove trailing commas) // write code file contents (remove trailing commas)
string output = resourceIdentifierInitializer.str(); string output = resourceIdentifierInitializer.str();
outputFile << "extern const std::string c_ResourceIdentifiers[] = {" << endl; outputFile << "std::string c_ResourceIdentifiers[] = {" << endl;
outputFile << output.substr(0, output.length() - 1); outputFile << output.substr(0, output.length() - 1);
outputFile << endl << "};" << endl << endl; outputFile << endl << "};" << endl << endl;
output = resourceIndexInitializer.str(); output = resourceIndexInitializer.str();
outputFile << "extern const unsigned int c_ResourceIndex[][2] = {" << endl; outputFile << "unsigned int c_ResourceIndex[][2] = {" << endl;
outputFile << output.substr(0, output.length() - 1); outputFile << output.substr(0, output.length() - 1);
outputFile << endl << "};" << endl << endl; outputFile << endl << "};" << endl << endl;
output = resourceStorageInitializer.str(); output = resourceStorageInitializer.str();
outputFile << "extern const unsigned char c_ResourceStorage[] = {" << endl; outputFile << "unsigned char c_ResourceStorage[] = {" << endl;
outputFile << output.substr(0, output.length() - 1); outputFile << output.substr(0, output.length() - 1);
outputFile << endl << "};" << endl << endl; outputFile << endl << "};" << endl << endl;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment