From bdfbc50dab615b2632db666a09460a2bd76d9c14 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sun, 4 Jan 2015 19:51:54 +0100 Subject: [PATCH] Removed some superfluous stuff. Former-commit-id: ca742ac6588e8c7bb8a3b2c73ac420e2e45bfa23 --- src/storage/expressions/Variable.cpp | 12 +-------- src/storage/expressions/Variable.h | 38 +++++++++++++--------------- 2 files changed, 19 insertions(+), 31 deletions(-) diff --git a/src/storage/expressions/Variable.cpp b/src/storage/expressions/Variable.cpp index b0acaba22..492a6ae32 100644 --- a/src/storage/expressions/Variable.cpp +++ b/src/storage/expressions/Variable.cpp @@ -51,14 +51,4 @@ namespace storm { return this->getType().isNumericalType(); } } -} - -namespace std { - std::size_t hash::operator()(storm::expressions::Variable const& variable) const { - return std::hash()(variable.getIndex()); - } - - std::size_t less::operator()(storm::expressions::Variable const& variable1, storm::expressions::Variable const& variable2) const { - return variable1.getIndex() < variable2.getIndex(); - } -} +} \ No newline at end of file diff --git a/src/storage/expressions/Variable.h b/src/storage/expressions/Variable.h index e99fd70c4..8bb7e0ce8 100644 --- a/src/storage/expressions/Variable.h +++ b/src/storage/expressions/Variable.h @@ -8,26 +8,6 @@ #include "src/storage/expressions/Type.h" #include "src/storage/expressions/Expression.h" -namespace storm { - namespace expressions { - class Variable; - } -} - -namespace std { - // Provide a hashing operator, so we can put variables in unordered collections. - template <> - struct hash { - std::size_t operator()(storm::expressions::Variable const& variable) const; - }; - - // Provide a less operator, so we can put variables in ordered collections. - template <> - struct less { - std::size_t operator()(storm::expressions::Variable const& variable1, storm::expressions::Variable const& variable2) const; - }; -} - namespace storm { namespace expressions { class ExpressionManager; @@ -141,4 +121,22 @@ namespace storm { } } +namespace std { + // Provide a hashing operator, so we can put variables in unordered collections. + template <> + struct hash { + std::size_t operator()(storm::expressions::Variable const& variable) const { + return std::hash()(variable.getIndex()); + } + }; + + // Provide a less operator, so we can put variables in ordered collections. + template <> + struct less { + std::size_t operator()(storm::expressions::Variable const& variable1, storm::expressions::Variable const& variable2) const { + return variable1.getIndex() < variable2.getIndex(); + } + }; +} + #endif /* STORM_STORAGE_EXPRESSIONS_VARIABLE_H_ */ \ No newline at end of file