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