From 16382c9ba92c9518c3a1ebc5a960fd668e6cb0e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 30 Sep 2012 02:06:51 +0200 Subject: [PATCH] No need to have separate ConfigurationValue implementation for Vector. --- src/Math/Vector.h | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/Math/Vector.h b/src/Math/Vector.h index 42f19ad0b..85cab8a2f 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -303,33 +303,7 @@ template Corrade::Utility::Debug operator<<(Corrade::Utili namespace Corrade { namespace Utility { /** @configurationvalue{Magnum::Math::Vector} */ -template struct ConfigurationValue> { - /** @brief Writes elements separated with spaces */ - static std::string toString(const Magnum::Math::Vector& value, int flags = 0) { - std::string output; - - for(size_t pos = 0; pos != size; ++pos) { - if(!output.empty()) output += ' '; - output += ConfigurationValue::toString(value[pos], flags); - } - - return output; - } - - /** @brief Reads elements separated with whitespace */ - static Magnum::Math::Vector fromString(const std::string& stringValue, int flags = 0) { - Magnum::Math::Vector result; - std::istringstream in(stringValue); - - std::string num; - for(size_t pos = 0; pos != size; ++pos) { - in >> num; - result[pos] = ConfigurationValue::fromString(num, flags); - } - - return result; - } -}; +template struct ConfigurationValue>: public ConfigurationValue> {}; }}