From b39121c6a682eb8ae5efd29a875bd7c098185f04 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 20 Feb 2015 00:31:09 -0500 Subject: Refactor config file API. The config file API previously relied on binding config variables using M_BindVariable() which took a void pointer. It occurred to me that if used on a boolean variable, this would be erroneous, but the void pointer would make it impossible to tell. Split this into separate M_Bind{Foo}Variable() functions based on type, which allows for proper type checking on the pointers that are passed. Vaguely related to #509. --- src/setup/compatibility.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/setup/compatibility.c') diff --git a/src/setup/compatibility.c b/src/setup/compatibility.c index 83dabdc8..df202117 100644 --- a/src/setup/compatibility.c +++ b/src/setup/compatibility.c @@ -43,8 +43,8 @@ void BindCompatibilityVariables(void) { if (gamemission == doom || gamemission == strife) { - M_BindVariable("vanilla_savegame_limit", &vanilla_savegame_limit); - M_BindVariable("vanilla_demo_limit", &vanilla_demo_limit); + M_BindIntVariable("vanilla_savegame_limit", &vanilla_savegame_limit); + M_BindIntVariable("vanilla_demo_limit", &vanilla_demo_limit); } } -- cgit v1.2.3