mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-07 00:42:57 +08:00
refactor: number comparison
This commit is contained in:
parent
db280387ba
commit
3b68645330
@ -49,9 +49,9 @@ public class RefreshPolicyExcelConfigData extends GameResource {
|
|||||||
upperBound(
|
upperBound(
|
||||||
params, (int) params.get(0), (int) params.get(params.size() - 1), (int) temp);
|
params, (int) params.get(0), (int) params.get(params.size() - 1), (int) temp);
|
||||||
var upper_bound = params.get(upper_bound_idx);
|
var upper_bound = params.get(upper_bound_idx);
|
||||||
if (params.get(params.size() - 1) == upper_bound) {
|
if (params.get(params.size() - 1).equals(upper_bound)) {
|
||||||
return (params.get(params.size() - 1) - params.get(0)) + 60 * 60 * 24 * 7;
|
return (params.get(params.size() - 1) - params.get(0)) + 60 * 60 * 24 * 7;
|
||||||
} else if (params.get(0) == upper_bound) {
|
} else if (params.get(0).equals(upper_bound)) {
|
||||||
return (params.get(params.size() - 1) - params.get(0)) + 60 * 60 * 24 * 7;
|
return (params.get(params.size() - 1) - params.get(0)) + 60 * 60 * 24 * 7;
|
||||||
}
|
}
|
||||||
return (params.get(upper_bound_idx - 1) - params.get(0));
|
return (params.get(upper_bound_idx - 1) - params.get(0));
|
||||||
@ -65,9 +65,9 @@ public class RefreshPolicyExcelConfigData extends GameResource {
|
|||||||
upperBound(
|
upperBound(
|
||||||
params, (int) params.get(0), (int) params.get(params.size() - 1), (int) temp);
|
params, (int) params.get(0), (int) params.get(params.size() - 1), (int) temp);
|
||||||
var upper_bound = params.get(upper_bound_idx);
|
var upper_bound = params.get(upper_bound_idx);
|
||||||
if (params.get(params.size() - 1) == upper_bound) {
|
if (params.get(params.size() - 1).equals(upper_bound)) {
|
||||||
return (params.get(params.size() - 1) - params.get(0)) + 60 * 60 * 24 * 7;
|
return (params.get(params.size() - 1) - params.get(0)) + 60 * 60 * 24 * 7;
|
||||||
} else if (params.get(0) == upper_bound) {
|
} else if (params.get(0).equals(upper_bound)) {
|
||||||
return (params.get(params.size() - 1) - params.get(0)) + 60 * 60 * 24 * 7;
|
return (params.get(params.size() - 1) - params.get(0)) + 60 * 60 * 24 * 7;
|
||||||
}
|
}
|
||||||
return (params.get(upper_bound_idx - 1) - params.get(0));
|
return (params.get(upper_bound_idx - 1) - params.get(0));
|
||||||
|
Loading…
Reference in New Issue
Block a user