[beast: 13/22] SFI: use Rapicorn's assert_unreached()
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 13/22] SFI: use Rapicorn's assert_unreached()
- Date: Thu, 24 Sep 2015 20:10:03 +0000 (UTC)
commit 7b7fa1501759f0a93d9e6557f8461d6848517b8c
Author: Tim Janik <timj gnu org>
Date: Mon Sep 21 20:25:20 2015 +0200
SFI: use Rapicorn's assert_unreached()
sfi/sfidl-corec.cc | 2 +-
sfi/sfidl-corecxx.cc | 8 ++++----
sfi/sfidl-generator.cc | 4 ++--
sfi/sfidl-parser.cc | 8 ++++----
sfi/sfivmarshal.cc | 4 ++--
sfi/tests/misctests.cc | 2 +-
6 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/sfi/sfidl-corec.cc b/sfi/sfidl-corec.cc
index b38ead8..6e5a638 100644
--- a/sfi/sfidl-corec.cc
+++ b/sfi/sfidl-corec.cc
@@ -119,7 +119,7 @@ class CodeGeneratorCoreC : public CodeGenerator {
case RECORD: return TypeName (type, "*");
case SEQUENCE: return TypeName (type, "*");
case OBJECT: return TypeName (type, "*");
- default: g_assert_not_reached(); return NULL;
+ default: assert_unreached(); return NULL;
}
}
const char*
diff --git a/sfi/sfidl-corecxx.cc b/sfi/sfidl-corecxx.cc
index 23d3c8b..3669b7e 100644
--- a/sfi/sfidl-corecxx.cc
+++ b/sfi/sfidl-corecxx.cc
@@ -365,7 +365,7 @@ public:
case RECORD: return make_fqtn (type, "Handle");
case SEQUENCE: return make_fqtn (type);
case OBJECT: return is_cxx_class (type) ? make_fqtn (type, "*") : make_PrefixedTypeName (type,
"*");
- default: g_assert_not_reached(); return NULL;
+ default: assert_unreached(); return NULL;
}
}
const char*
@@ -386,7 +386,7 @@ public:
case RECORD:
case SEQUENCE: return intern (String ("const ") + TypeField (type) + " &");
case OBJECT: return TypeField (type);
- default: g_assert_not_reached(); return NULL;
+ default: assert_unreached(); return NULL;
}
}
const char*
@@ -420,7 +420,7 @@ public:
return intern (String() + "::Bse::CxxBase::value_set_casted< " + type + ", " + type + "Base>");
else
return intern (String() + "::Bse::CxxBase::value_set_gobject");
- default: g_assert_not_reached(); return NULL;
+ default: assert_unreached(); return NULL;
}
}
const char*
@@ -447,7 +447,7 @@ public:
"::Bse::CxxBase::value_get_object< " + make_fqtn (type) + "Base* >");
else
return intern (String ("::Bse::CxxBase::value_get_gobject< ") + make_PrefixedTypeName (type) +
">");
- default: g_assert_not_reached(); return NULL;
+ default: assert_unreached(); return NULL;
}
}
const char*
diff --git a/sfi/sfidl-generator.cc b/sfi/sfidl-generator.cc
index 653fb6d..1524890 100644
--- a/sfi/sfidl-generator.cc
+++ b/sfi/sfidl-generator.cc
@@ -161,7 +161,7 @@ String CodeGenerator::toWordCase (const String& word, WordCase wc)
break;
case UPPER: result += toupper (*si);
break;
- default: g_assert_not_reached();
+ default: assert_unreached();
}
}
return result;
@@ -225,7 +225,7 @@ CodeGenerator::rename (NamespaceHelper& nsh, const String& name, WordCase namesp
const String& namespace_join, const vector<String>& namespace_append,
WordCase typename_wc, const String& typename_join)
{
- g_assert_not_reached ();
+ assert_unreached ();
String pform = nsh.printableForm (name);
return pform;
}
diff --git a/sfi/sfidl-parser.cc b/sfi/sfidl-parser.cc
index ef1b095..359f648 100644
--- a/sfi/sfidl-parser.cc
+++ b/sfi/sfidl-parser.cc
@@ -508,7 +508,7 @@ void Parser::preprocessContents (const String& input_filename)
case '<': state = filenameIn2;
break;
default: g_printerr ("bad char after include statement");
- g_assert_not_reached (); // error handling!
+ assert_unreached (); // error handling!
}
}
else if((state == filenameIn1 && *i == '"')
@@ -986,7 +986,7 @@ GTokenType Parser::parseStringOrConst (String &s)
s = ci->str;
break;
default:
- g_assert_not_reached ();
+ assert_unreached ();
break;
}
return G_TOKEN_NONE;
@@ -1008,7 +1008,7 @@ GTokenType Parser::parseConstant (bool isident)
Constant cdef;
if (isident)
- g_assert_not_reached (); /* parse_or_return (TOKEN_CONST_IDENT); */
+ assert_unreached (); /* parse_or_return (TOKEN_CONST_IDENT); */
else
parse_or_return (TOKEN_CONST);
parse_or_return (G_TOKEN_IDENTIFIER);
@@ -1495,7 +1495,7 @@ GTokenType Parser::parseParamHints (Param &def)
}
break;
default:
- g_assert_not_reached ();
+ assert_unreached ();
break;
}
}
diff --git a/sfi/sfivmarshal.cc b/sfi/sfivmarshal.cc
index 2c086cf..10b7399 100644
--- a/sfi/sfivmarshal.cc
+++ b/sfi/sfivmarshal.cc
@@ -94,7 +94,7 @@ put_val (Arg *a,
#endif
default:
t = 0;
- g_assert_not_reached ();
+ assert_unreached ();
}
return t;
}
@@ -2087,6 +2087,6 @@ sfi_vmarshal_switch (guint sig)
case 0x3fd: return sfi_vmarshal_33331; /* 241 */
case 0x3fe: return sfi_vmarshal_33332; /* 242 */
case 0x3ff: return sfi_vmarshal_33333; /* 243 */
- default: g_assert_not_reached (); return NULL;
+ default: assert_unreached (); return NULL;
}
}
diff --git a/sfi/tests/misctests.cc b/sfi/tests/misctests.cc
index 1b6c5bc..6f16ecc 100644
--- a/sfi/tests/misctests.cc
+++ b/sfi/tests/misctests.cc
@@ -599,7 +599,7 @@ generate_vmarshal_code (void)
g_print ("static VMarshal\nsfi_vmarshal_switch (guint sig)\n{\n");
g_print (" switch (sig)\n {\n");
generate_vmarshal_loop ();
- g_print (" default: g_assert_not_reached (); return NULL;\n");
+ g_print (" default: assert_unreached (); return NULL;\n");
g_print (" }\n}\n");
}
static const char *pointer1 = "huhu";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]