summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2025-06-24 17:55:48 -0400
committerAlexander Taylor <alex@vector35.com>2025-06-25 18:36:47 -0400
commitc41f264a1dba68c89b4a224a70e3a5783f7fa879 (patch)
tree00bb6e91d86b708bff7265ed7179a6ef2793b7fb /arch
parentb1a7666164a000c5255f90568ed9597b58ce276a (diff)
Remove implicit conversions from Confidence to underlying type, these can cause bugs and also issues with C++20
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/arch_arm64.cpp18
-rw-r--r--arch/armv7/arch_armv7.cpp2
-rw-r--r--arch/mips/arch_mips.cpp6
3 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm64/arch_arm64.cpp b/arch/arm64/arch_arm64.cpp
index 1032c15c..b0e97995 100644
--- a/arch/arm64/arch_arm64.cpp
+++ b/arch/arm64/arch_arm64.cpp
@@ -2358,7 +2358,7 @@ class Arm64ImportedFunctionRecognizer : public FunctionRecognizer
DataVariable var;
if (data->GetDataVariableAtAddress(extSym.front()->GetAddress(), var))
{
- func->ApplyImportedTypes(funcSym, var.type);
+ func->ApplyImportedTypes(funcSym, var.type.GetValue());
}
return true;
}
@@ -2431,12 +2431,12 @@ class Arm64ImportedFunctionRecognizer : public FunctionRecognizer
data->GetDataVariableAtAddress(loadAddrConstant.value, target);
Ref<Type> funcType = nullptr;
- if (target.type && target.type->GetClass() == PointerTypeClass &&
- target.type.GetConfidence() >= BN_MINIMUM_CONFIDENCE)
+ if (target.type.GetValue() && target.type->GetClass() == PointerTypeClass
+ && target.type.GetConfidence() >= BN_MINIMUM_CONFIDENCE)
{
target.type = target.type->GetChildType();
- if (target.type && target.type->GetClass() == FunctionTypeClass &&
- target.type.GetConfidence() >= BN_MINIMUM_CONFIDENCE)
+ if (target.type.GetValue() && target.type->GetClass() == FunctionTypeClass
+ && target.type.GetConfidence() >= BN_MINIMUM_CONFIDENCE)
funcType = target.type.GetValue();
}
@@ -2522,12 +2522,12 @@ class Arm64ImportedFunctionRecognizer : public FunctionRecognizer
data->GetDataVariableAtAddress(loadAddrConstant.value, target);
Ref<Type> funcType = nullptr;
- if (target.type && target.type->GetClass() == PointerTypeClass &&
- target.type.GetConfidence() >= BN_MINIMUM_CONFIDENCE)
+ if (target.type.GetValue() && target.type->GetClass() == PointerTypeClass
+ && target.type.GetConfidence() >= BN_MINIMUM_CONFIDENCE)
{
target.type = target.type->GetChildType();
- if (target.type && target.type->GetClass() == FunctionTypeClass &&
- target.type.GetConfidence() >= BN_MINIMUM_CONFIDENCE)
+ if (target.type.GetValue() && target.type->GetClass() == FunctionTypeClass
+ && target.type.GetConfidence() >= BN_MINIMUM_CONFIDENCE)
funcType = target.type.GetValue();
}
diff --git a/arch/armv7/arch_armv7.cpp b/arch/armv7/arch_armv7.cpp
index 5739a8bd..f27a3fb9 100644
--- a/arch/armv7/arch_armv7.cpp
+++ b/arch/armv7/arch_armv7.cpp
@@ -2231,7 +2231,7 @@ public:
return false;
Confidence<Ref<Type>> type = entryFunc->GetType();
- data->DefineImportedFunction(sym, func, type);
+ data->DefineImportedFunction(sym, func, type.GetValue());
return true;
}
}
diff --git a/arch/mips/arch_mips.cpp b/arch/mips/arch_mips.cpp
index 0c788133..4cd8b26c 100644
--- a/arch/mips/arch_mips.cpp
+++ b/arch/mips/arch_mips.cpp
@@ -2726,7 +2726,7 @@ private:
DataVariable var;
if (data->GetDataVariableAtAddress(extSym.front()->GetAddress(), var))
{
- func->ApplyImportedTypes(funcSym, var.type);
+ func->ApplyImportedTypes(funcSym, var.type.GetValue());
}
return true;
}
@@ -2799,7 +2799,7 @@ private:
DataVariable var;
if (data->GetDataVariableAtAddress(extSym.front()->GetAddress(), var))
{
- func->ApplyImportedTypes(pltSym, var.type);
+ func->ApplyImportedTypes(pltSym, var.type.GetValue());
}
return true;
}
@@ -2924,7 +2924,7 @@ private:
DataVariable var;
if (data->GetDataVariableAtAddress(extSym.front()->GetAddress(), var))
{
- func->ApplyImportedTypes(funcSym, var.type);
+ func->ApplyImportedTypes(funcSym, var.type.GetValue());
}
return true;
}