Merge pull request #234 from RElesgoe/master

Fix compile errors
This commit is contained in:
RElesgoe 2016-08-05 16:43:41 -07:00 committed by GitHub
commit fc82715c61
2 changed files with 8 additions and 8 deletions

View file

@ -54,13 +54,13 @@ namespace lua
{
}
virtual ~exception()
virtual ~exception() throw()
{
}
virtual const char* what() const
virtual const char* what() const throw()
{
return this->m_what.c_str();
return m_what.c_str();
}
protected:
std::string m_what;
@ -115,7 +115,7 @@ namespace lua
}
}
lua_State* get_st() const noexcept
lua_State* get_st() const
{
return st;
}
@ -187,7 +187,7 @@ namespace lua
// push to stack std::map
template<typename _key, typename _val, typename _comp, typename _alloc>
void push(const std::map<_key, _val, _comp, _alloc>& v) throw()
void push(const std::map<_key, _val, _comp, _alloc>& v)
{
lua_newtable(st);
@ -201,7 +201,7 @@ namespace lua
// push to stack std::vector
template<typename _val, typename _alloc>
void push(const std::vector<_val, _alloc>& v) throw()
void push(const std::vector<_val, _alloc>& v)
{
lua_newtable(st);

View file

@ -158,11 +158,11 @@ namespace pvpgn
extern std::map<long, char*> userlog_read(const char* username, long startline, const char* search_substr)
{
if (!username)
throw std::exception("username is a nullptr");
throw std::runtime_error("username is a nullptr");
FILE* fp = std::fopen(userlog_filename(username), "r");
if (!fp)
throw std::exception("Could not open userlog");
throw std::runtime_error("Could not open userlog");
// set position to the end of file
std::fseek(fp, 0, SEEK_END);