mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-24 04:41:25 +00:00
User supplied math constants take precedence
This commit is contained in:
parent
11ecc6cb0b
commit
b20e2a9d34
1 changed files with 5 additions and 3 deletions
8
ftepp.c
8
ftepp.c
|
@ -539,9 +539,11 @@ static bool ftepp_define(ftepp_t *ftepp)
|
||||||
|
|
||||||
macro = ftepp_macro_find(ftepp, ftepp_tokval(ftepp));
|
macro = ftepp_macro_find(ftepp, ftepp_tokval(ftepp));
|
||||||
|
|
||||||
/* ignore creating a math macro if one is already present */
|
/* user defined ones take precedence */
|
||||||
if (macro && mathconstant)
|
if (macro && mathconstant) {
|
||||||
break;
|
ftepp_macro_delete(ftepp, ftepp_tokval(ftepp));
|
||||||
|
macro = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (macro && ftepp->output_on) {
|
if (macro && ftepp->output_on) {
|
||||||
if (ftepp_warn(ftepp, WARN_CPP, "redefining `%s`", ftepp_tokval(ftepp)))
|
if (ftepp_warn(ftepp, WARN_CPP, "redefining `%s`", ftepp_tokval(ftepp)))
|
||||||
|
|
Loading…
Reference in a new issue