Permalink
Browse files

Fix build on gcc 4.8 and clang 8.

Not allowing implict conversion to base class without explicit
ownership transfer.
  • Loading branch information...
unknownbrackets committed Jun 30, 2018
1 parent 440465f commit 250885d7c947e2e4971c05147e4a1b6ea8887efc
Showing with 12 additions and 12 deletions.
  1. +1 −1 Archs/ARM/ArmParser.cpp
  2. +1 −1 Core/ELF/ElfRelocator.cpp
  3. +9 −9 Parser/DirectivesParser.cpp
  4. +1 −1 Parser/Parser.cpp
@@ -49,7 +49,7 @@ std::unique_ptr<CAssemblerCommand> parseDirectivePool(Parser& parser, int flags)
seq->addCommand(make_unique<CDirectiveAlignFill>(4,CDirectiveAlignFill::Align));
seq->addCommand(make_unique<ArmPoolCommand>());
return seq;
return std::move(seq);
}
const wchar_t* msgTemplate =
@@ -270,7 +270,7 @@ std::unique_ptr<CAssemblerCommand> ElfRelocator::generateCtor(const std::wstring
auto func = ::make_unique<CDirectiveFunction>(ctorName,ctorName);
func->setContent(std::move(content));
return func;
return std::move(func);
}
void ElfRelocator::loadRelocation(Elf32_Rel& rel, ByteArray& data, int offset, Endianness endianness)
@@ -41,10 +41,10 @@ std::unique_ptr<CAssemblerCommand> parseDirectiveOpen(Parser& parser, int flags)
return nullptr;
file->initCopy(inputName,outputName,memoryAddress);
return file;
return std::move(file);
} else {
file->initOpen(inputName,memoryAddress);
return file;
return std::move(file);
}
}
@@ -65,14 +65,14 @@ std::unique_ptr<CAssemblerCommand> parseDirectiveCreate(Parser& parser, int flag
auto file = make_unique<CDirectiveFile>();
file->initCreate(inputName,memoryAddress);
return file;
return std::move(file);
}
std::unique_ptr<CAssemblerCommand> parseDirectiveClose(Parser& parser, int flags)
{
auto file = make_unique<CDirectiveFile>();
file->initClose();
return file;
return std::move(file);
}
std::unique_ptr<CAssemblerCommand> parseDirectiveIncbin(Parser& parser, int flags)
@@ -92,7 +92,7 @@ std::unique_ptr<CAssemblerCommand> parseDirectiveIncbin(Parser& parser, int flag
if (list.size() == 3)
incbin->setSize(list[2]);
return incbin;
return std::move(incbin);
}
std::unique_ptr<CAssemblerCommand> parseDirectivePosition(Parser& parser, int flags)
@@ -297,7 +297,7 @@ std::unique_ptr<CAssemblerCommand> parseDirectiveConditional(Parser& parser, int
cond = make_unique<CDirectiveConditional>(type);
cond->setContent(std::move(ifBlock),std::move(elseBlock));
return cond;
return std::move(cond);
}
std::unique_ptr<CAssemblerCommand> parseDirectiveTable(Parser& parser, int flags)
@@ -376,7 +376,7 @@ std::unique_ptr<CAssemblerCommand> parseDirectiveData(Parser& parser, int flags)
break;
}
return data;
return std::move(data);
}
std::unique_ptr<CAssemblerCommand> parseDirectiveMipsArch(Parser& parser, int flags)
@@ -451,7 +451,7 @@ std::unique_ptr<CAssemblerCommand> parseDirectiveArea(Parser& parser, int flags)
parser.eatToken();
area->setContent(std::move(content));
return area;
return std::move(area);
}
std::unique_ptr<CAssemblerCommand> parseDirectiveErrorWarning(Parser& parser, int flags)
@@ -592,7 +592,7 @@ std::unique_ptr<CAssemblerCommand> parseDirectiveFunction(Parser& parser, int fl
}
func->setContent(std::move(seq));
return func;
return std::move(func);
}
std::unique_ptr<CAssemblerCommand> parseDirectiveMessage(Parser& parser, int flags)
@@ -155,7 +155,7 @@ std::unique_ptr<CAssemblerCommand> Parser::parseCommandSequence(wchar_t indicato
Logger::printError(Logger::Error, L"Unterminated command sequence, expected any of %s.", expected);
}
return sequence;
return std::move(sequence);
}
std::unique_ptr<CAssemblerCommand> Parser::parseFile(TextFile& file, bool virtualFile)

0 comments on commit 250885d

Please sign in to comment.