Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Any.h #3514

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Foundation/include/Poco/Any.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.content())
{
s.append(1, '(');
s.append(operand._pHolder->type().name());
s.append(operand.content()->type().name());
s.append(" => ");
s.append(typeid(ValueType).name());
s.append(1, ')');
Expand Down Expand Up @@ -564,10 +564,11 @@ const ValueType& RefAnyCast(const Any & operand)
if (!result)
{
std::string s = "RefAnyCast: Failed to convert between Any types ";
if (operand._pHolder)

if (operand.content())
{
s.append(1, '(');
s.append(operand._pHolder->type().name());
s.append(operand.content()->type().name());
s.append(" => ");
s.append(typeid(ValueType).name());
s.append(1, ')');
Expand All @@ -589,10 +590,10 @@ ValueType& RefAnyCast(Any& operand)
if (!result)
{
std::string s = "RefAnyCast: Failed to convert between Any types ";
if (operand._pHolder)
if (operand.content())
{
s.append(1, '(');
s.append(operand._pHolder->type().name());
s.append(operand.content()->type().name());
s.append(" => ");
s.append(typeid(ValueType).name());
s.append(1, ')');
Expand Down