mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-26 18:49:06 +00:00
Performance pass 6 (Wrapper type may be primitive)
This commit is contained in:
@@ -876,7 +876,7 @@ public class Form
|
||||
*/
|
||||
public static String ofSize(long s, int div)
|
||||
{
|
||||
Double d = (double) s;
|
||||
double d = (double) s;
|
||||
String sub = "Bytes";
|
||||
|
||||
if(d > div - 1)
|
||||
@@ -929,7 +929,7 @@ public class Form
|
||||
*/
|
||||
public static String ofSize(long s, int div, int dec)
|
||||
{
|
||||
Double d = (double) s;
|
||||
double d = (double) s;
|
||||
String sub = "Bytes";
|
||||
|
||||
if(d > div - 1)
|
||||
@@ -979,7 +979,7 @@ public class Form
|
||||
{
|
||||
s = -s;
|
||||
}
|
||||
Double d = (double) s;
|
||||
double d = (double) s;
|
||||
String sub = "Grams";
|
||||
|
||||
if(d > div - 1)
|
||||
|
||||
@@ -1652,7 +1652,7 @@ public class JSONObject
|
||||
*/
|
||||
public static Object stringToValue(String string)
|
||||
{
|
||||
Double d;
|
||||
double d;
|
||||
if(string.equals(""))
|
||||
{
|
||||
return string;
|
||||
@@ -1682,8 +1682,8 @@ public class JSONObject
|
||||
{
|
||||
if(string.indexOf('.') > -1 || string.indexOf('e') > -1 || string.indexOf('E') > -1)
|
||||
{
|
||||
d = Double.valueOf(string);
|
||||
if(!d.isInfinite() && !d.isNaN())
|
||||
d = Double.parseDouble(string);
|
||||
if(!Double.isInfinite(d) && !Double.isNaN(d))
|
||||
{
|
||||
return d;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user