Windows fix.

This commit is contained in:
chriseth 2016-04-19 19:00:23 +02:00
parent ed9da5171b
commit 8704dd0f7f
2 changed files with 14 additions and 3 deletions

View File

@ -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); }

View File

@ -207,7 +207,7 @@ assembly::VariableDeclaration Parser::parseVariableDeclaration()
return varDecl;
}
FunctionalInstruction Parser::parseFunctionalInstruction(Statement&& _instruction)
FunctionalInstruction Parser::parseFunctionalInstruction(assembly::Statement&& _instruction)
{
if (_instruction.type() != typeid(Instruction))
fatalParserError("Assembly instruction required in front of \"(\")");