From 23919d09f650f453d70ac9f46657d301e03ac143 Mon Sep 17 00:00:00 2001 From: Zarklord Date: Fri, 2 Feb 2018 13:27:59 -0500 Subject: [PATCH] im really bad at programming... --- .../UniversalPropertyReplacement.cpp | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/UniversalPropertyReplacement/UniversalPropertyReplacement.cpp b/UniversalPropertyReplacement/UniversalPropertyReplacement.cpp index 4089435..a1a3a89 100644 --- a/UniversalPropertyReplacement/UniversalPropertyReplacement.cpp +++ b/UniversalPropertyReplacement/UniversalPropertyReplacement.cpp @@ -48,21 +48,21 @@ long UniversalPropReplacement::AttachDetour() { SetDetourAddress(GetString16, GetMethodAddress(App::Property, GetString16)); SetDetourAddress(GetCString16, GetMethodAddress(App::Property, GetCString16)); long result = 0; - //lets not Detour functions with empty vector array's, no reason to run useless code. - if (boolValueMapDefault.size() != 0 || boolValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetBool_original, DetouredGetBool); - if (floatValueMapDefault.size() != 0 || floatValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetFloat_original, DetouredGetFloat); - if (int32ValueMapDefault.size() != 0 || int32ValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetInt32_original, DetouredGetInt32); - if (uint32ValueMapDefault.size() != 0 || uint32ValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetUInt32_original, DetouredGetUInt32); - if (vector2ValueMapDefault.size() != 0 || vector2ValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetVector2_original, DetouredGetVector2); - if (vector3ValueMapDefault.size() != 0 || vector3ValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetVector3_original, DetouredGetVector3); - if (vector4ValueMapDefault.size() != 0 || vector4ValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetVector4_original, DetouredGetVector4); - if (colorRGBValueMapDefault.size() != 0 || colorRGBValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetColorRGB_original, DetouredGetColorRGB); - if (colorRGBAValueMapDefault.size() != 0 || colorRGBAValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetColorRGBA_original, DetouredGetColorRGBA); - if (resourceKeyValueMapDefault.size() != 0 || resourceKeyValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetKey_original, DetouredGetKey); - if (stringValueMapDefault.size() != 0 || stringValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetString8_original, DetouredGetString8); - if (cstringValueMapDefault.size() != 0 || cstringValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetCString8_original, DetouredGetCString8); - if (wstringValueMapDefault.size() != 0 || wstringValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetString16_original, DetouredGetString16); - if (wcstringValueMapDefault.size() != 0 || wcstringValueMapOverride.size() != 0) result |= AttachDetourFunctionStatic(GetCString16_original, DetouredGetCString16); + + result |= AttachDetourFunctionStatic(GetBool_original, DetouredGetBool); + result |= AttachDetourFunctionStatic(GetFloat_original, DetouredGetFloat); + result |= AttachDetourFunctionStatic(GetInt32_original, DetouredGetInt32); + result |= AttachDetourFunctionStatic(GetUInt32_original, DetouredGetUInt32); + result |= AttachDetourFunctionStatic(GetVector2_original, DetouredGetVector2); + result |= AttachDetourFunctionStatic(GetVector3_original, DetouredGetVector3); + result |= AttachDetourFunctionStatic(GetVector4_original, DetouredGetVector4); + result |= AttachDetourFunctionStatic(GetColorRGB_original, DetouredGetColorRGB); + result |= AttachDetourFunctionStatic(GetColorRGBA_original, DetouredGetColorRGBA); + result |= AttachDetourFunctionStatic(GetKey_original, DetouredGetKey); + result |= AttachDetourFunctionStatic(GetString8_original, DetouredGetString8); + result |= AttachDetourFunctionStatic(GetCString8_original, DetouredGetCString8); + result |= AttachDetourFunctionStatic(GetString16_original, DetouredGetString16); + result |= AttachDetourFunctionStatic(GetCString16_original, DetouredGetCString16); // You can compare result to NO_ERROR to see if there was any error. Or you can just ignore it. return result; }