From ed1b365c12009df05825077f26511838cc183a3a Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Mon, 3 Jul 2023 11:02:42 +0200 Subject: [PATCH] CUtlRBTree: Fix ambiguous overload compiler errors Ambiguous overload caused by having 2 constructors who's parameters have types that are equal in size. Since these container size types have been explicitly converted to 64bits to align it with the code compiled in the engine, the compiler no longer knows which constructor to call. Added explicit casts to solve the problem. This error was triggered by declaring: static CUtlMap s_ConVarFlags(DefLessFunc(const char*)); --- r5dev/public/tier1/utlrbtree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r5dev/public/tier1/utlrbtree.h b/r5dev/public/tier1/utlrbtree.h index 1c82442c..d3db9602 100644 --- a/r5dev/public/tier1/utlrbtree.h +++ b/r5dev/public/tier1/utlrbtree.h @@ -397,7 +397,7 @@ inline CUtlRBTree::CUtlRBTree(int64 growSize, int64 initSize, const template < class T, class I, typename L, class M > inline CUtlRBTree::CUtlRBTree(const LessFunc_t& lessfunc) : - m_Elements(0, 0), + m_Elements((int64)0, (int64)0), m_LessFunc(lessfunc), m_Root(InvalidIndex()), m_NumElements(0),