mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-15 14:43:32 +02:00
SF [2360817] Build failure in Var.cpp
This commit is contained in:
parent
69ee9eee82
commit
905534af1c
@ -435,8 +435,8 @@ public:
|
||||
return holderImpl<std::vector<Var>,
|
||||
InvalidAccessException>("Not an array.")->operator[](n);
|
||||
else if (isStruct())
|
||||
return holderImpl<Struct<int>,
|
||||
InvalidAccessException>("Not a struct.")->operator[](n);
|
||||
return structIndexOperator(holderImpl<Struct<int>,
|
||||
InvalidAccessException>("Not a struct."), n);
|
||||
else
|
||||
throw InvalidAccessException("Must be struct or array.");
|
||||
}
|
||||
@ -447,11 +447,11 @@ public:
|
||||
/// returns true! In all other cases InvalidAccessException is thrown.
|
||||
{
|
||||
if (isArray())
|
||||
return const_cast<const Var&>(holderImpl<std::vector<Var>,
|
||||
InvalidAccessException>("Not an array.")->operator[](n));
|
||||
return holderImpl<std::vector<Var>,
|
||||
InvalidAccessException>("Not an array.")->operator[](n);
|
||||
else if (isStruct())
|
||||
return const_cast<const Var&>(holderImpl<Struct<int>,
|
||||
InvalidAccessException>("Not a struct.")->operator[](n));
|
||||
return structIndexOperator(holderImpl<Struct<int>,
|
||||
InvalidAccessException>("Not a struct."), n);
|
||||
else
|
||||
throw InvalidAccessException("Must be struct or array.");
|
||||
}
|
||||
@ -545,6 +545,8 @@ private:
|
||||
throw E(errorMessage);
|
||||
}
|
||||
|
||||
Var& structIndexOperator(VarHolderImpl<Struct<int> >* pStr, int n) const;
|
||||
|
||||
VarHolder* _pHolder;
|
||||
};
|
||||
|
||||
|
@ -477,4 +477,10 @@ std::string Var::toString(const Var& any)
|
||||
}
|
||||
|
||||
|
||||
Var& Var::structIndexOperator(VarHolderImpl<Struct<int> >* pStr, int n) const
|
||||
{
|
||||
return pStr->operator[](n);
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Dynamic
|
||||
|
Loading…
x
Reference in New Issue
Block a user