diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/model/Typesystem.cpp | 2 | ||||
-rw-r--r-- | src/core/model/Typesystem.hpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/model/Typesystem.cpp b/src/core/model/Typesystem.cpp index 8d5654c..0078022 100644 --- a/src/core/model/Typesystem.cpp +++ b/src/core/model/Typesystem.cpp @@ -385,7 +385,7 @@ bool StructType::derivedFrom(Handle<StructType> other) const return false; } -Variant StructType::cast(Variant &data, Logger &logger) const +bool StructType::cast(Variant &data, Logger &logger) const { return buildFromArrayOrMap(data, logger, true); } diff --git a/src/core/model/Typesystem.hpp b/src/core/model/Typesystem.hpp index c279b5d..cc29d4c 100644 --- a/src/core/model/Typesystem.hpp +++ b/src/core/model/Typesystem.hpp @@ -607,8 +607,9 @@ public: * @param data is the data that should be cast to this type. The data must * have been built by a derived type of this type instance. * @param logger is the Logger instance to which errors should be logged. + * @return true if the operation is successful, false otherwise. */ - Variant cast(Variant &data, Logger &logger) const; + bool cast(Variant &data, Logger &logger) const; /** * Returns a handle pointing at the parent type. |