aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/SourceLocation.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-04-20 01:00:23 +0800
committerchriseth <c@ethdev.com>2016-04-21 22:13:39 +0800
commit8704dd0f7f32e2ebf9ca26d8c93f1d41d51b904a (patch)
treec8671688dba46a49f793371a8eed25a8623ee7f4 /libevmasm/SourceLocation.h
parented9da5171b84e6e1846820a45d97e5c041d57206 (diff)
downloaddexon-solidity-8704dd0f7f32e2ebf9ca26d8c93f1d41d51b904a.tar.gz
dexon-solidity-8704dd0f7f32e2ebf9ca26d8c93f1d41d51b904a.tar.zst
dexon-solidity-8704dd0f7f32e2ebf9ca26d8c93f1d41d51b904a.zip
Windows fix.
Diffstat (limited to 'libevmasm/SourceLocation.h')
-rw-r--r--libevmasm/SourceLocation.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/libevmasm/SourceLocation.h b/libevmasm/SourceLocation.h
index 54f86450..8e22a826 100644
--- a/libevmasm/SourceLocation.h
+++ b/libevmasm/SourceLocation.h
@@ -26,6 +26,7 @@
#include <string>
#include <ostream>
#include <tuple>
+#include <libdevcore/Common.h> // defines noexcept macro for MSVC
namespace dev
{
@@ -39,10 +40,20 @@ struct SourceLocation
SourceLocation(): start(-1), end(-1) { }
SourceLocation(int _start, int _end, std::shared_ptr<std::string const> _sourceName):
start(_start), end(_end), sourceName(_sourceName) { }
- SourceLocation(SourceLocation&&) = default;
+ SourceLocation(SourceLocation&& _other) noexcept:
+ start(_other.start),
+ end(_other.end),
+ sourceName(std::move(_other.sourceName))
+ {}
SourceLocation(SourceLocation const& _other) = default;
SourceLocation& operator=(SourceLocation const&) = default;
- SourceLocation& operator=(SourceLocation&&) = default;
+ SourceLocation& operator=(SourceLocation&& _other) noexcept
+ {
+ start = _other.start;
+ end = _other.end;
+ sourceName = std::move(_other.sourceName);
+ return *this;
+ }
bool operator==(SourceLocation const& _other) const { return start == _other.start && end == _other.end;}
bool operator!=(SourceLocation const& _other) const { return !operator==(_other); }