[UserDefault-android] Return defaultValue parameter instead of some default value (#16416)

* Return defaultValue parameter instead of some default value

* Remove unnecessary semicolon
This commit is contained in:
Michael Kösel 2016-08-24 12:07:17 +02:00 committed by minggo
parent e124fe4fc5
commit c339266556
1 changed files with 4 additions and 4 deletions

View File

@ -532,7 +532,7 @@ public class Cocos2dxHelper {
}
}
return false;
return defaultValue;
}
public static int getIntegerForKey(String key, int defaultValue) {
@ -560,7 +560,7 @@ public class Cocos2dxHelper {
}
}
return 0;
return defaultValue;
}
public static float getFloatForKey(String key, float defaultValue) {
@ -569,7 +569,7 @@ public class Cocos2dxHelper {
return settings.getFloat(key, defaultValue);
}
catch (Exception ex) {
ex.printStackTrace();;
ex.printStackTrace();
Map allValues = settings.getAll();
Object value = allValues.get(key);
@ -588,7 +588,7 @@ public class Cocos2dxHelper {
}
}
return 0.0f;
return defaultValue;
}
public static double getDoubleForKey(String key, double defaultValue) {