mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 10:32:29 +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);
|
||||
|
||||
id nextcomponent = NextComponent(key, path, size);
|
||||
auto nextcomponent = NextComponent(key, path, size);
|
||||
|
||||
id prefix = @"com.blizzard";
|
||||
if ((flags & STORM_REGISTRY_BATTLENET)) {
|
||||
|
|
@ -31,7 +31,7 @@ bool GetDefaultsAndKeyPath(const char* key, const char* name, uint32_t flags, NS
|
|||
domain = prefix;
|
||||
}
|
||||
|
||||
id sregstatic = SRegStatic::Get();
|
||||
auto sregstatic = SRegStatic::Get();
|
||||
id hive = sregstatic->hives[domain];
|
||||
*defaults = hive;
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ bool GetDefaultsAndKeyPath(const char* key, const char* name, uint32_t flags, NS
|
|||
STORM_VALIDATE(length < size);
|
||||
STORM_VALIDATE_END;
|
||||
|
||||
for (id sep = path; ; *sep = '/') {
|
||||
for (auto sep = path; ; *sep = '/') {
|
||||
sep = SStrChr(sep, '\\');
|
||||
if (!sep) {
|
||||
break;
|
||||
|
|
@ -72,7 +72,7 @@ bool GetDefaultsAndKeyPath(const char* key, const char* name, uint32_t flags, NS
|
|||
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;
|
||||
char path[STORM_MAX_PATH];
|
||||
if (!GetDefaultsAndKeyPath(keyname, valuename, flags, &defaults, path, STORM_MAX_PATH)) {
|
||||
|
|
|
|||
|
|
@ -9,13 +9,8 @@ public:
|
|||
|
||||
static SRegStatic Get();
|
||||
|
||||
SRegStatic() {
|
||||
this->hives = [NSMutableDictionary init];
|
||||
}
|
||||
|
||||
~SRegStatic() {
|
||||
this->hives = nil;
|
||||
}
|
||||
SRegStatic();
|
||||
~SRegStatic();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "storm/registry/mac/Static.hpp"
|
||||
|
||||
static SRegStatic* SRegStatic::Get() {
|
||||
SRegStatic* SRegStatic::Get() {
|
||||
static SRegStatic sregstatic;
|
||||
return &sregstatic;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue