Rename not renaming all instances of a macro

Sysprogs forums Forums VisualGDB Rename not renaming all instances of a macro

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22205
    nevyn
    Participant

    I’m just renaming some macro definitions and it looks like the rename is not renaming all instances of the macro.

    File – Messaging.h:

    #define TM_INTERFACE              (0)
    #define TM_FUNCTION               (TM_INTERFACE + 1)
    #define TM_MESSAGE_ID             (TM_FUNCTION + 4)
    #define TM_PAYLOAD_LENGTH         (TM_MESSAGE_ID + 4)
    #define TM_HEADER_LENGTH          (TM_PAYLOAD_LENGTH + 2)
    

    These definitions are then used through out the application code files.

    I right click on one of the definitions, say TM_INTERFACE, and select <i>Rename</i> from the context menu and the SysProgs rename dialog appears.

    Renaming the macro to APP_REQUEST_INTERFACE results in the following file:

    #define APP_REQUEST_INTERFACE                (0)
    #define TM_FUNCTION                 (TM_INTERFACE + 1)
    #define TM_MESSAGE_ID               (TM_FUNCTION + 4)
    #define TM_PAYLOAD_LENGTH           (TM_MESSAGE_ID + 4)
    #define TM_HEADER_LENGTH            (TM_PAYLOAD_LENGTH + 2)
    

    As you can see, the use of TM_INTERFACE in the definition of TM_FUNCTION has not been renamed.

    Regards,
    Mark

    • This topic was modified 6 years, 1 month ago by nevyn.
    • This topic was modified 6 years, 1 month ago by nevyn.
    #22212
    support
    Keymaster

    Hi,

    Thanks, looks like VisualGDB was not properly recording some uses of the macros. Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.6.2459.msi

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.