]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/script/common/c_types.h
Remove unused functions reported by cppcheck (#10463)
[dragonfireclient.git] / src / script / common / c_types.h
index bc9f1cb9671d7b8916c20b69678f37324bb3f469..86bfb0b6b0ed0894d25928b08f6fb29606dce5da 100644 (file)
@@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef C_TYPES_H_
-#define C_TYPES_H_
+#pragma once
 
 extern "C" {
 #include "lua.h"
@@ -26,6 +25,8 @@ extern "C" {
 
 #include <iostream>
 
+#include "exceptions.h"
+
 struct EnumString
 {
        int num;
@@ -50,21 +51,11 @@ class StackUnroller
        }
 };
 
-class LuaError : public std::exception
+class LuaError : public ModError
 {
 public:
-       LuaError(lua_State *L, const std::string &s);
-
-       virtual ~LuaError() throw()
-       {}
-       virtual const char * what() const throw()
-       {
-               return m_s.c_str();
-       }
-       std::string m_s;
+       LuaError(const std::string &s) : ModError(s) {}
 };
 
 
 extern EnumString es_ItemType[];
-
-#endif /* C_TYPES_H_ */