mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-30 15:32:37 +00:00
commit
e2c2c28f4c
@ -25,7 +25,10 @@ ExternalProject_Add(taglib
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wno-unused-result -Wno-deprecated-declarations")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
|
||||
# enable for additional memory checking with fsanitize
|
||||
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -fsanitize=address,undefined")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
||||
|
||||
if (${LINK_STATICALLY} MATCHES "true")
|
||||
|
@ -55,9 +55,11 @@ static nlohmann::json loadLocaleData(const std::string& fn) {
|
||||
char* bytes = nullptr;
|
||||
int count = 0;
|
||||
|
||||
if (FileToByteArray(fn, &bytes, count, true)) {
|
||||
if (FileToByteArray(fn, &bytes, count, true) == true) {
|
||||
try {
|
||||
return nlohmann::json::parse(bytes);
|
||||
nlohmann::json localeData = nlohmann::json::parse(bytes);
|
||||
free(bytes);
|
||||
return localeData;
|
||||
}
|
||||
catch (...) {
|
||||
}
|
||||
@ -180,4 +182,4 @@ int Locale::Dimension(const char* key, int defaultValue) {
|
||||
}
|
||||
|
||||
return defaultValue; /* not found anywhere */
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user