From e43c0865452841d21263f4b26ee73abceb294dfb Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Tue, 7 Nov 2023 08:08:44 +0100 Subject: [PATCH] Add enum to int conversion in function call overload --- oscar64/Parser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oscar64/Parser.cpp b/oscar64/Parser.cpp index 8a7e99c..8d02b4f 100644 --- a/oscar64/Parser.cpp +++ b/oscar64/Parser.cpp @@ -6007,6 +6007,8 @@ int Parser::OverloadDistance(Declaration* fdec, Expression* pexp) dist += 0; else if (ptype->mType == DT_TYPE_INTEGER && etype->mType == DT_TYPE_FLOAT) dist += 16; + else if (ptype->mType == DT_TYPE_INTEGER && etype->mType == DT_TYPE_ENUM) + dist += 32; else if (ptype->mType == DT_TYPE_FLOAT && etype->mType == DT_TYPE_INTEGER) dist += 8; else if (ptype->IsSame(ex->mDecType))