diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2014-12-29 00:44:34 +0100 |
---|---|---|
committer | Andreas Stöckel <andreas@somweyr.de> | 2014-12-29 00:44:34 +0100 |
commit | 6dd1e1660e8d97ae1c93ff463c58a780c14b08f4 (patch) | |
tree | 9c656e187a1650a7d7b9b221c3478f20c5807183 /src/core | |
parent | 0af66457f7739df4c1b151b2adb7479d87275c9a (diff) |
fixed StructType::cast signature, more unit tests
Diffstat (limited to 'src/core')
-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. |