Small #ifndef suggestion in Client.cpp

  • kroq-gar78
    12th Feb 2013 Member 0 Permalink

    I see that the current code reads (see the bottom since I can't get this to format correctly):

     

    So, if I'm reading this right, if "IGNORE_UPDATES" is defined, then it won't show the update notification.

     

    My question is, if this is a precompiler flag, why put it down there? Why not move the #ifndef up to around line 662 where all of the JSON processing is happening? Currently, all of the JSON processing time and all is being wasted because the end result is never displayed.

     

    Am I missing something? Otherwise, I think it should be moved up to avoid unnecessary operations.

     

    #ifndef IGNORE_UPDATES
    if(updateAvailable)
    {
        notifyUpdateAvailable();
    }
    #endif

  • jacob1
    12th Feb 2013 Developer 0 Permalink
    I don't know why, maybe I saw all the other needed stuff like motd and notifications, and assumed all of it was needed. That should only be defined for mods anyway, and no mods exist for tpt++ yet (and no one knows about the flag either, I haven't put it in any guide). So, maybe i'll fix it when i remember.