More correct way of getting wrappers hashcode
This commit is contained in:
1 parent
2de7a25e99
commit
136cdce0db
6 files changed
+6
-18
No files matched your search
@@ -1,7 +1,5 @@
|
||||
package imgui.type;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class ImBoolean implements Cloneable {
|
||||
private final boolean[] data = new boolean[]{false};
|
||||
|
||||
@@ -47,7 +45,7 @@ public final class ImBoolean implements Cloneable {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(data[0]);
|
||||
return Boolean.hashCode(data[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package imgui.type;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class ImDouble implements Cloneable {
|
||||
private final double[] data = new double[]{0.0d};
|
||||
|
||||
@@ -47,7 +45,7 @@ public final class ImDouble implements Cloneable {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(data[0]);
|
||||
return Double.hashCode(data[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package imgui.type;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class ImFloat implements Cloneable {
|
||||
private final float[] data = new float[]{0};
|
||||
|
||||
@@ -47,7 +45,7 @@ public final class ImFloat implements Cloneable {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(data[0]);
|
||||
return Float.hashCode(data[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package imgui.type;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class ImInt implements Cloneable {
|
||||
private final int[] data = new int[]{0};
|
||||
|
||||
@@ -47,7 +45,7 @@ public final class ImInt implements Cloneable {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(data[0]);
|
||||
return Integer.hashCode(data[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package imgui.type;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class ImLong implements Cloneable {
|
||||
private final long[] data = new long[]{0};
|
||||
|
||||
@@ -47,7 +45,7 @@ public final class ImLong implements Cloneable {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(data[0]);
|
||||
return Long.hashCode(data[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package imgui.type;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class ImShort implements Cloneable {
|
||||
private final short[] data = new short[]{0};
|
||||
|
||||
@@ -47,7 +45,7 @@ public final class ImShort implements Cloneable {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(data[0]);
|
||||
return Short.hashCode(data[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user