GP-0: Fixing deprecated calls to Conv

This commit is contained in:
Ryan Kurtz 2025-06-13 08:30:19 -04:00
parent 412bd0ffc1
commit 5ac69075e3
55 changed files with 225 additions and 285 deletions

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -19,7 +19,6 @@ import ghidra.docking.settings.Settings;
import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressOverflowException;
import ghidra.program.model.mem.*;
import ghidra.util.Conv;
import ghidra.util.Msg;
/**
@ -157,13 +156,13 @@ public abstract class CountedDynamicDataType extends DynamicDataType {
try {
switch (counterSize) {
case 1:
test = Conv.byteToLong(memory.getByte(loc));
test = Byte.toUnsignedLong(memory.getByte(loc));
break;
case 2:
test = Conv.shortToLong(memory.getShort(loc));
test = Short.toUnsignedLong(memory.getShort(loc));
break;
case 4:
test = Conv.intToLong(memory.getInt(loc));
test = Integer.toUnsignedLong(memory.getInt(loc));
break;
case 8:
test = memory.getLong(loc);

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -21,7 +21,6 @@ import ghidra.docking.settings.Settings;
import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressOverflowException;
import ghidra.program.model.mem.*;
import ghidra.util.Conv;
import ghidra.util.Msg;
/**
@ -239,13 +238,13 @@ public abstract class IndexedDynamicDataType extends DynamicDataType {
try {
switch (indexSize) {
case 1:
test = Conv.byteToLong(memory.getByte(loc));
test = Byte.toUnsignedLong(memory.getByte(loc));
break;
case 2:
test = Conv.shortToLong(memory.getShort(loc));
test = Short.toUnsignedLong(memory.getShort(loc));
break;
case 4:
test = Conv.intToLong(memory.getInt(loc));
test = Integer.toUnsignedLong(memory.getInt(loc));
break;
case 8:
test = memory.getLong(loc);

View file

@ -21,7 +21,6 @@ import ghidra.docking.settings.Settings;
import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressOverflowException;
import ghidra.program.model.mem.*;
import ghidra.util.Conv;
import ghidra.util.Msg;
/**
@ -158,13 +157,13 @@ public abstract class RepeatedDynamicDataType extends DynamicDataType {
try {
switch (terminatorSize) {
case 1:
test = Conv.byteToLong(memory.getByte(loc));
test = Byte.toUnsignedLong(memory.getByte(loc));
break;
case 2:
test = Conv.shortToLong(memory.getShort(loc));
test = Short.toUnsignedLong(memory.getShort(loc));
break;
case 4:
test = Conv.intToLong(memory.getInt(loc));
test = Integer.toUnsignedLong(memory.getInt(loc));
break;
case 8:
test = memory.getLong(loc);

View file

@ -18,7 +18,6 @@
package ghidra.program.util;
import ghidra.program.model.address.Address;
import ghidra.program.model.listing.CodeUnit;
import ghidra.program.model.listing.Program;
/**