mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-0: Fixing deprecated calls to Conv
This commit is contained in:
parent
412bd0ffc1
commit
5ac69075e3
55 changed files with 225 additions and 285 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue