#9356 closed patch
AGI: Convert preagi_winnie macros to inline functions
Reported by: | SF/agf863 | Owned by: | SF/mthreepwood |
---|---|---|---|
Priority: | normal | Component: | Engine: AGI |
Version: | Keywords: | ||
Cc: | Game: |
Description
preagi_winnie.cpp uses macros to inline two functions, "setTakeDrop()" and "makeSel()". In C++ I believe it's considered proper to do this is with real inline functions. setTakeDrop also seems to use too much code for what it needs to do.
This trivial patch replaces the two #defines with inline functions, and simplifies setTakeDrop. It was tested with MinGW on Windows 7.
Ticket imported from: #3298149. Ticket imported from: patches/1461.
Attachments (1)
Change History (5)
by , 14 years ago
Attachment: | preagi_winnie_inline.patch added |
---|
comment:1 by , 14 years ago
Owner: | set to |
---|
comment:2 by , 14 years ago
Committed a modified patch in 8dd17a2ae11db5033d732d3f625ec48ab556f2f3.
The functions don't need to be inline as the compiler can optimize the functions as it sees fit in these instances. In addition, the macro vs. inline thing is only a preference; the patch was committed because it was cleaner.
comment:3 by , 14 years ago
Status: | new → closed |
---|
comment:4 by , 6 years ago
Component: | → Engine: AGI |
---|
Patch to convert preagi_winnie macros to inline functions