mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Remove ToString calls on string objects
This commit is contained in:
@@ -169,7 +169,7 @@ namespace Flowframes.IO
|
|||||||
|
|
||||||
public static bool GetBool(string key, bool defaultVal)
|
public static bool GetBool(string key, bool defaultVal)
|
||||||
{
|
{
|
||||||
WriteIfDoesntExist(key.ToString(), (defaultVal ? true : false).ToString());
|
WriteIfDoesntExist(key, (defaultVal ? true : false).ToString());
|
||||||
return bool.Parse(Get(key, Type.Bool));
|
return bool.Parse(Get(key, Type.Bool));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ namespace Flowframes.IO
|
|||||||
|
|
||||||
public static int GetInt(string key, int defaultVal)
|
public static int GetInt(string key, int defaultVal)
|
||||||
{
|
{
|
||||||
WriteIfDoesntExist(key.ToString(), defaultVal.ToString());
|
WriteIfDoesntExist(key, defaultVal.ToString());
|
||||||
return GetInt(key);
|
return GetInt(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ namespace Flowframes.IO
|
|||||||
|
|
||||||
public static float GetFloat(string key, float defaultVal)
|
public static float GetFloat(string key, float defaultVal)
|
||||||
{
|
{
|
||||||
WriteIfDoesntExist(key.ToString(), defaultVal.ToStringDot());
|
WriteIfDoesntExist(key, defaultVal.ToStringDot());
|
||||||
return Get(key, Type.Float).GetFloat();
|
return Get(key, Type.Float).GetFloat();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ namespace Flowframes.IO
|
|||||||
|
|
||||||
static void WriteIfDoesntExist (string key, string val)
|
static void WriteIfDoesntExist (string key, string val)
|
||||||
{
|
{
|
||||||
if (CachedValues.ContainsKey(key.ToString()))
|
if (CachedValues.ContainsKey(key))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Set(key, val);
|
Set(key, val);
|
||||||
|
|||||||
Reference in New Issue
Block a user