diff options
author | Marius Kintel <marius@kintel.net> | 2013-06-26 03:39:02 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-06-26 03:39:02 (GMT) |
commit | 1b7cc41a7f454e005ca07815ba463a7fac5e1f8e (patch) | |
tree | 85f0d93ef9d547d17bd536d58e36be575d6ab0b9 /src/value.cc | |
parent | d9b3f7b52b3c3d5c21dc11234325739d3e28ee02 (diff) |
Short circuit boolean logic - fixes #411
Diffstat (limited to 'src/value.cc')
-rw-r--r-- | src/value.cc | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/value.cc b/src/value.cc index ebb825d..8fbde44 100644 --- a/src/value.cc +++ b/src/value.cc @@ -297,11 +297,6 @@ Value &Value::operator=(const Value &v) return *this; } -Value Value::operator!() const -{ - return Value(!this->toBool()); -} - class equals_visitor : public boost::static_visitor<bool> { public: @@ -324,16 +319,6 @@ bool Value::operator!=(const Value &v) const return !(*this == v); } -bool Value::operator&&(const Value &v) const -{ - return this->toBool() && v.toBool(); -} - -bool Value::operator||(const Value &v) const -{ - return this->toBool() || v.toBool(); -} - class less_visitor : public boost::static_visitor<bool> { public: |