mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Core: Minot Ini refactoring
git-svn-id: svn://ultimatepp.org/upp/trunk@9181 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ac6ccfdb3e
commit
aae63d1385
2 changed files with 14 additions and 15 deletions
|
|
@ -124,19 +124,6 @@ String GetIniFile()
|
|||
static VectorMap<String, String>& sIniKeys()
|
||||
{
|
||||
static VectorMap<String, String> key;
|
||||
return key;
|
||||
}
|
||||
|
||||
VectorMap<String, String> GetIniKeys()
|
||||
{
|
||||
Mutex::Lock __(sMtx);
|
||||
return VectorMap<String, String>(sIniKeys(), 0);
|
||||
}
|
||||
|
||||
String GetIniKey(const char *id, const String& def) {
|
||||
ASSERT_(IsMainRunning(), "GetIniKey is allowed only after APP_MAIN has started");
|
||||
Mutex::Lock __(sMtx);
|
||||
VectorMap<String, String>& key = sIniKeys();
|
||||
static int version;
|
||||
if(version != ini_version__) {
|
||||
version = ini_version__;
|
||||
|
|
@ -152,7 +139,19 @@ String GetIniKey(const char *id, const String& def) {
|
|||
key = LoadIniFile(GetHomeDirFile("q.ini"));
|
||||
#endif
|
||||
}
|
||||
return key.Get(id, def);
|
||||
return key;
|
||||
}
|
||||
|
||||
VectorMap<String, String> GetIniKeys()
|
||||
{
|
||||
Mutex::Lock __(sMtx);
|
||||
return clone(sIniKeys());
|
||||
}
|
||||
|
||||
String GetIniKey(const char *id, const String& def) {
|
||||
ASSERT_(IsMainRunning(), "GetIniKey is allowed only after APP_MAIN has started");
|
||||
Mutex::Lock __(sMtx);
|
||||
return sIniKeys().Get(id, def);
|
||||
}
|
||||
|
||||
String GetIniKey(const char *id)
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class ImageDraw : public SystemDraw {
|
|||
void FetchStraight(ImageBuffer& b) const;
|
||||
|
||||
public:
|
||||
Draw& Alpha();
|
||||
Draw& Alpha();
|
||||
|
||||
operator Image() const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue