3 comments:
File src/commonlib/include/commonlib/sort.h:
Patch Set #3, Line 16: SORT_H_
nit: _COMMONLIB_SORT_H_?
Ack
Patch Set #3, Line 9: #define swap(a, b) do { \
This needs to be in commonlib if the function using it is in commonlib (probably commonlib/helpers. […]
Agree, will move to commonlib/helpers.h
Patch Set #3, Line 13: } while (0)
edit: Actually, if you do decide to leave it like this, maybe call it SWAP() because then it's clear […]
In my point of view a macro can deal with lvalue pretty fine in this case. So if you are not totally against it I would like to keep it. I agree though to change it to uppercase, that will align better with existing macros like MIN, MAX and the like in helpers.h.
To view, visit change 31544. To unsubscribe, or for help writing mail filters, visit settings.