mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-22 02:31:28 +00:00
Make it compile as C++ code too
This commit is contained in:
parent
c86e778c76
commit
10738da2fb
3 changed files with 3 additions and 3 deletions
2
ftepp.c
2
ftepp.c
|
@ -312,7 +312,7 @@ static GMQCC_INLINE void ftepp_update_output_condition(ftepp_t *ftepp)
|
|||
|
||||
static GMQCC_INLINE ppmacro* ftepp_macro_find(ftepp_t *ftepp, const char *name)
|
||||
{
|
||||
return util_htget(ftepp->macros, name);
|
||||
return (ppmacro*)util_htget(ftepp->macros, name);
|
||||
}
|
||||
|
||||
static GMQCC_INLINE void ftepp_macro_delete(ftepp_t *ftepp, const char *name)
|
||||
|
|
2
intrin.h
2
intrin.h
|
@ -404,7 +404,7 @@ ast_expression *intrin_func(parser_t *parser, const char *name) {
|
|||
if ((find = (void*)parser_find_global(parser, name)) && ((ast_value*)find)->expression.vtype == TYPE_FUNCTION)
|
||||
for (i = 0; i < vec_size(parser->functions); ++i)
|
||||
if (((ast_value*)find)->name && !strcmp(parser->functions[i]->name, ((ast_value*)find)->name) && parser->functions[i]->builtin < 0)
|
||||
return find;
|
||||
return (ast_expression*)find;
|
||||
|
||||
if ((find = util_htget(intrin_intrinsics(), name))) {
|
||||
/* intrinsic is in table. This will "generate the function" so
|
||||
|
|
2
parser.c
2
parser.c
|
@ -257,7 +257,7 @@ static ast_value* parser_const_string(parser_t *parser, const char *str, bool do
|
|||
{
|
||||
size_t hash = util_hthash(parser->ht_imm_string, str);
|
||||
ast_value *out;
|
||||
if ( (out = util_htgeth(parser->ht_imm_string, str, hash)) ) {
|
||||
if ( (out = (ast_value*)util_htgeth(parser->ht_imm_string, str, hash)) ) {
|
||||
if (dotranslate && out->name[0] == '#') {
|
||||
char name[32];
|
||||
snprintf(name, sizeof(name), "dotranslate_%lu", (unsigned long)(parser->translated++));
|
||||
|
|
Loading…
Reference in a new issue