From 004f1b195691c1b8f3e5eb6f30c16c4696e14a61 Mon Sep 17 00:00:00 2001 From: Andrew Auclair Date: Sat, 5 Feb 2022 13:51:43 -0500 Subject: [PATCH 1/2] Update Any.h The Poco Any/DynamicAny::Var SOO now compiles properly if POCO_ENABLE_SOO is defined. --- Foundation/include/Poco/Any.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Foundation/include/Poco/Any.h b/Foundation/include/Poco/Any.h index ba6b71433a..a24def0ebe 100644 --- a/Foundation/include/Poco/Any.h +++ b/Foundation/include/Poco/Any.h @@ -522,10 +522,10 @@ ValueType AnyCast(Any& operand) if (!result) { std::string s = "RefAnyCast: Failed to convert between Any types "; - if (operand._pHolder) + if (operand._valueHolder.content()) { s.append(1, '('); - s.append(operand._pHolder->type().name()); + s.append(operand._valueHolder.content()->type().name()); s.append(" => "); s.append(typeid(ValueType).name()); s.append(1, ')'); @@ -564,10 +564,10 @@ const ValueType& RefAnyCast(const Any & operand) if (!result) { std::string s = "RefAnyCast: Failed to convert between Any types "; - if (operand._pHolder) + if (operand._valueHolder.content()) { s.append(1, '('); - s.append(operand._pHolder->type().name()); + s.append(operand._valueHolder.content()->type().name()); s.append(" => "); s.append(typeid(ValueType).name()); s.append(1, ')'); @@ -589,10 +589,10 @@ ValueType& RefAnyCast(Any& operand) if (!result) { std::string s = "RefAnyCast: Failed to convert between Any types "; - if (operand._pHolder) + if (operand._valueHolder.content()) { s.append(1, '('); - s.append(operand._pHolder->type().name()); + s.append(operand._valueHolder.content()->type().name()); s.append(" => "); s.append(typeid(ValueType).name()); s.append(1, ')'); From ba7e301f4c60c955df44ec40845f490fbc3a1a30 Mon Sep 17 00:00:00 2001 From: Andrew Auclair Date: Mon, 7 Feb 2022 12:32:12 -0500 Subject: [PATCH 2/2] Update Any.h Fixing Any.h so that it will compile properly with and without POCO_ENABLE_SOO --- Foundation/include/Poco/Any.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Foundation/include/Poco/Any.h b/Foundation/include/Poco/Any.h index a24def0ebe..c5a4a56ee6 100644 --- a/Foundation/include/Poco/Any.h +++ b/Foundation/include/Poco/Any.h @@ -522,10 +522,10 @@ ValueType AnyCast(Any& operand) if (!result) { std::string s = "RefAnyCast: Failed to convert between Any types "; - if (operand._valueHolder.content()) + if (operand.content()) { s.append(1, '('); - s.append(operand._valueHolder.content()->type().name()); + s.append(operand.content()->type().name()); s.append(" => "); s.append(typeid(ValueType).name()); s.append(1, ')'); @@ -564,10 +564,11 @@ const ValueType& RefAnyCast(const Any & operand) if (!result) { std::string s = "RefAnyCast: Failed to convert between Any types "; - if (operand._valueHolder.content()) + + if (operand.content()) { s.append(1, '('); - s.append(operand._valueHolder.content()->type().name()); + s.append(operand.content()->type().name()); s.append(" => "); s.append(typeid(ValueType).name()); s.append(1, ')'); @@ -589,10 +590,10 @@ ValueType& RefAnyCast(Any& operand) if (!result) { std::string s = "RefAnyCast: Failed to convert between Any types "; - if (operand._valueHolder.content()) + if (operand.content()) { s.append(1, '('); - s.append(operand._valueHolder.content()->type().name()); + s.append(operand.content()->type().name()); s.append(" => "); s.append(typeid(ValueType).name()); s.append(1, ')');