Skip to content

Commit

Permalink
cleaned warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
avivi55 committed Nov 20, 2023
1 parent a4392b6 commit 29fee03
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
5 changes: 1 addition & 4 deletions src/main/java/project/cpu/Binary32.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
import java.nio.ByteBuffer;

public class Binary32 {
public byte[] byteArray = new byte[4];
public byte[] byteArray;
public Binary32(Integer i) {
byteArray = ByteBuffer.allocate(4)
.putInt(i)
.array();
}
public Binary32(Character c) {
this((int) c);
}

public Binary32(byte[] array){
byteArray = array;
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/project/cpu/GeneralPurposeRegister.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,4 @@ public GeneralPurposeRegister(Integer data, int index) {
super(data);
this.index = index;
}

public GeneralPurposeRegister(Character data, int index) {
super(data);
this.index = index;
}
}
2 changes: 0 additions & 2 deletions src/main/java/project/cpu/Mnemonics.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package project.cpu;

import java.util.List;

public enum Mnemonics {
// Arithmetics
ADD((r, r1) -> ALU.addition(r.getData(), r1.getData())),
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/project/cpu/Register.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
package project.cpu;

import java.nio.ByteBuffer;
import java.util.Arrays;

public class Register {
private Binary32 data;

public Register(Integer i) {
setData(i);
}

public Register(Character c) {
setData(c);
}

public Binary32 getData() {
return data;
}
Expand All @@ -25,8 +17,4 @@ public void setData(Binary32 b32) {
public void setData(Integer i) {
data = new Binary32(i);
}

public void setData(Character c) {
data = new Binary32(c);
}
}

0 comments on commit 29fee03

Please sign in to comment.