mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
* enh(ProcessRunner): does not detect launch errors #4482 * enh(File): add absolutePath and existsAnywhere() #4482 * fix windows build and tsan fail * fix tsan * fix windows file tests * comment out some CI env path -related issues * fix tsan and windows build * try to fix ci * ignore ProcessRunner test fail on windows cmake * enh(File): canExecute throws FileNotFoundException if the file to be executed can't be found in the path. * Few C++ modernisation changes. * enh(File): Windows specifics of File::canExecute. Returns false if the file to be executed can't be found using absolutePath. --------- Co-authored-by: Matej Kenda <matejken@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f24547cdcf
commit
3656f069e1
@@ -388,6 +388,9 @@ private:
|
||||
template <typename ValueType>
|
||||
friend ValueType* AnyCast(Any*);
|
||||
|
||||
template <typename ValueType>
|
||||
friend const ValueType* AnyCast(const Any*);
|
||||
|
||||
template <typename ValueType>
|
||||
friend ValueType* UnsafeAnyCast(Any*);
|
||||
|
||||
@@ -426,7 +429,9 @@ const ValueType* AnyCast(const Any* operand)
|
||||
/// const MyType* pTmp = AnyCast<MyType>(pAny).
|
||||
/// Returns nullptr if the types don't match.
|
||||
{
|
||||
return AnyCast<ValueType>(const_cast<Any*>(operand));
|
||||
return operand && operand->type() == typeid(ValueType)
|
||||
? &static_cast<const Any::Holder<ValueType>*>(operand->content())->_held
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user