AC28 compatibility (Xcode)

This commit is contained in:
Ralph Wessel
2024-11-13 17:52:24 +00:00
parent ac16fe2974
commit 7fb898cc47
11 changed files with 1586 additions and 2 deletions
@@ -260,7 +260,11 @@ namespace {
if (auto object = dynamic_cast<JS::Object*>(&source); object != nullptr) {
//Decompose an object
for (auto& item : object->GetItemTable())
#ifdef ServerMainVers_2800
result.push_back({ item.value, String{item.key} });
#else
result.push_back({ item.value->operator JS::Base * (), String{*item.key} });
#endif
}
else if (auto array = dynamic_cast<JS::Array*>(&source); array != nullptr) {
//Decompose an array
@@ -433,7 +437,11 @@ namespace {
if (objectJS != nullptr) {
JSON::ObjectValueRef objectJSON = new JSON::ObjectValue();
for (const auto& member : objectJS->GetItemTable())
#ifdef ServerMainVers_2800
objectJSON->AddValue(member.key, convertToJSONValue(member.value));
#else
objectJSON->AddValue(*member.key, convertToJSONValue(*member.value));
#endif
return objectJSON;
}
JS::Array* arrayJs = dynamic_cast<JS::Array*> ((JS::Base*)jsBase);