added const

This commit is contained in:
LianaHus 2015-10-15 16:51:01 +02:00
parent 292fb473bf
commit 656e749b1e
2 changed files with 4 additions and 4 deletions

View File

@ -328,12 +328,12 @@ void NameAndTypeResolver::reportFatalDeclarationError(
BOOST_THROW_EXCEPTION(FatalError()); BOOST_THROW_EXCEPTION(FatalError());
} }
void NameAndTypeResolver::reportTypeError(Error _e) void NameAndTypeResolver::reportTypeError(Error const& _e)
{ {
m_errors.push_back(make_shared<Error>(_e)); m_errors.push_back(make_shared<Error>(_e));
} }
void NameAndTypeResolver::reportFatalTypeError(Error _e) void NameAndTypeResolver::reportFatalTypeError(Error const& _e)
{ {
reportTypeError(_e); reportTypeError(_e);
BOOST_THROW_EXCEPTION(FatalError()); BOOST_THROW_EXCEPTION(FatalError());

View File

@ -106,9 +106,9 @@ private:
void reportFatalDeclarationError(SourceLocation _sourceLocation, std::string const& _description); void reportFatalDeclarationError(SourceLocation _sourceLocation, std::string const& _description);
// creates the Declaration error and adds it in the errors list // creates the Declaration error and adds it in the errors list
void reportTypeError(Error _e); void reportTypeError(Error const& _e);
// creates the Declaration error and adds it in the errors list and throws FatalError // creates the Declaration error and adds it in the errors list and throws FatalError
void reportFatalTypeError(Error _e); void reportFatalTypeError(const Error& _e);
DeclarationContainer* m_currentScope = nullptr; DeclarationContainer* m_currentScope = nullptr;
ErrorList& m_errors; ErrorList& m_errors;