From 52dc9f8ec16e37d2de6e64230faec8b2842ae6f0 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 26 Dec 2017 01:19:57 +0100 Subject: [PATCH] update: more logic in some ifdef's Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/2ddd0f79b704bcaf213205b20951b78515654087 Author: vanhofen Date: 2017-12-26 (Tue, 26 Dec 2017) Origin message was: ------------------ - update: more logic in some ifdef's --- src/gui/update.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 5d30ac9cb..2944e9125 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -1276,22 +1276,20 @@ int CFlashExpertSetup::showMenu() CMenuOptionChooser *m2 = new CMenuOptionChooser(LOCALE_FLASHUPDATE_CREATEIMAGE_ADD_ULDR, &g_settings.flashupdate_createimage_add_uldr, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true); -#ifndef UBOOT_BIN - g_settings.flashupdate_createimage_add_u_boot = 0; -g_settings.flashupdate_createimage_add_env = 0; -#endif #ifdef UBOOT_BIN CMenuOptionChooser *m3 = new CMenuOptionChooser(LOCALE_FLASHUPDATE_CREATEIMAGE_ADD_U_BOOT, &g_settings.flashupdate_createimage_add_u_boot, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true); CMenuOptionChooser *m4 = new CMenuOptionChooser(LOCALE_FLASHUPDATE_CREATEIMAGE_ADD_ENV, &g_settings.flashupdate_createimage_add_env, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true); -#endif -#ifndef SPARE_BIN -g_settings.flashupdate_createimage_add_spare = 0; +#else + g_settings.flashupdate_createimage_add_u_boot = 0; + g_settings.flashupdate_createimage_add_env = 0; #endif #ifdef SPARE_BIN CMenuOptionChooser *m5 = new CMenuOptionChooser(LOCALE_FLASHUPDATE_CREATEIMAGE_ADD_SPARE, &g_settings.flashupdate_createimage_add_spare, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true); +#else + g_settings.flashupdate_createimage_add_spare = 0; #endif CMenuOptionChooser *m6 = new CMenuOptionChooser(LOCALE_FLASHUPDATE_CREATEIMAGE_ADD_KERNEL, &g_settings.flashupdate_createimage_add_kernel, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true);