mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
fix(registry): squash some warnings, try to get it to compile on mac
This commit is contained in:
parent
fde8ed8c0f
commit
191be1b111
3 changed files with 7 additions and 12 deletions
|
|
@ -18,7 +18,7 @@ bool GetDefaultsAndKeyPath(const char* key, const char* name, uint32_t flags, NS
|
||||||
STORM_ASSERT(key);
|
STORM_ASSERT(key);
|
||||||
STORM_ASSERT(*key);
|
STORM_ASSERT(*key);
|
||||||
|
|
||||||
id nextcomponent = NextComponent(key, path, size);
|
auto nextcomponent = NextComponent(key, path, size);
|
||||||
|
|
||||||
id prefix = @"com.blizzard";
|
id prefix = @"com.blizzard";
|
||||||
if ((flags & STORM_REGISTRY_BATTLENET)) {
|
if ((flags & STORM_REGISTRY_BATTLENET)) {
|
||||||
|
|
@ -31,7 +31,7 @@ bool GetDefaultsAndKeyPath(const char* key, const char* name, uint32_t flags, NS
|
||||||
domain = prefix;
|
domain = prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
id sregstatic = SRegStatic::Get();
|
auto sregstatic = SRegStatic::Get();
|
||||||
id hive = sregstatic->hives[domain];
|
id hive = sregstatic->hives[domain];
|
||||||
*defaults = hive;
|
*defaults = hive;
|
||||||
|
|
||||||
|
|
@ -62,7 +62,7 @@ bool GetDefaultsAndKeyPath(const char* key, const char* name, uint32_t flags, NS
|
||||||
STORM_VALIDATE(length < size);
|
STORM_VALIDATE(length < size);
|
||||||
STORM_VALIDATE_END;
|
STORM_VALIDATE_END;
|
||||||
|
|
||||||
for (id sep = path; ; *sep = '/') {
|
for (auto sep = path; ; *sep = '/') {
|
||||||
sep = SStrChr(sep, '\\');
|
sep = SStrChr(sep, '\\');
|
||||||
if (!sep) {
|
if (!sep) {
|
||||||
break;
|
break;
|
||||||
|
|
@ -72,7 +72,7 @@ bool GetDefaultsAndKeyPath(const char* key, const char* name, uint32_t flags, NS
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSObject* GetObject(const char* keyname, const char* valuename, uint32_t flags) {
|
id GetObject(const char* keyname, const char* valuename, uint32_t flags) {
|
||||||
NSUserDefaults* defaults;
|
NSUserDefaults* defaults;
|
||||||
char path[STORM_MAX_PATH];
|
char path[STORM_MAX_PATH];
|
||||||
if (!GetDefaultsAndKeyPath(keyname, valuename, flags, &defaults, path, STORM_MAX_PATH)) {
|
if (!GetDefaultsAndKeyPath(keyname, valuename, flags, &defaults, path, STORM_MAX_PATH)) {
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,8 @@ public:
|
||||||
|
|
||||||
static SRegStatic Get();
|
static SRegStatic Get();
|
||||||
|
|
||||||
SRegStatic() {
|
SRegStatic();
|
||||||
this->hives = [NSMutableDictionary init];
|
~SRegStatic();
|
||||||
}
|
|
||||||
|
|
||||||
~SRegStatic() {
|
|
||||||
this->hives = nil;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include "storm/registry/mac/Static.hpp"
|
#include "storm/registry/mac/Static.hpp"
|
||||||
|
|
||||||
static SRegStatic* SRegStatic::Get() {
|
SRegStatic* SRegStatic::Get() {
|
||||||
static SRegStatic sregstatic;
|
static SRegStatic sregstatic;
|
||||||
return &sregstatic;
|
return &sregstatic;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue