]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
untested fix for "unused functions"
authorpippijn <pippijn@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 18 Jul 2007 09:54:07 +0000 (09:54 +0000)
committerpippijn <pippijn@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 18 Jul 2007 09:54:07 +0000 (09:54 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7471 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/json.h
src/modules/m_rpc_json.cpp

index ca9ed8d3f862d642cb659e011795672ca90eed5f..7643d971364e88df7bf5aff6ae85409806011f9b 100644 (file)
 #define expect_false(expr) maybe_expect ((expr) != 0, 0)
 #define expect_true(expr)  maybe_expect ((expr) != 0, 1)
 
-static void unreachable_internal (char const *file, int line, char const *function);
-static void throw_unless_internal (char const *file, int line, char const *function, char const *condition);
-static void throw_msg_unless_internal (char const *file, int line, char const *function, char const *message);
-
 #ifdef __GNUC__
 # define CURFUNC       __PRETTY_FUNCTION__
 #elif defined(__BORLANDC__)
@@ -30,10 +26,6 @@ static void throw_msg_unless_internal (char const *file, int line, char const *f
 # define CURFUNC       __FUNCTION__
 #endif
 
-#define throw_unreachable                       unreachable_internal (__FILE__, __LINE__, CURFUNC)
-#define throw_unless(condition)                 if (!expect_false (condition)) throw_unless_internal (__FILE__, __LINE__, CURFUNC, #condition)
-#define throw_msg_unless(condition, message)    if (!expect_false (condition)) throw_msg_unless_internal (__FILE__, __LINE__, CURFUNC, message)
-
 namespace json
 {
   class ValueIterator;
index 563ca627ca025517de77fe2c7c232091259763eb..4bcb3ba0860efd6eb8138f19734b2225859876ed 100644 (file)
@@ -135,6 +135,10 @@ throw_msg_unless_internal (char const *file, int line, char const *function, cha
   throw std::runtime_error (buf);
 }
 
+#define throw_unreachable                       unreachable_internal (__FILE__, __LINE__, CURFUNC)
+#define throw_unless(condition)                 if (!expect_false (condition)) throw_unless_internal (__FILE__, __LINE__, CURFUNC, #condition)
+#define throw_msg_unless(condition, message)    if (!expect_false (condition)) throw_msg_unless_internal (__FILE__, __LINE__, CURFUNC, message)
+
 
 namespace json
 {