Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2017-01-30 | add SWAP macro | René Scharfe | 1 | -0/+28 | |
Add a macro for exchanging the values of variables. It allows users to avoid repetition and takes care of the temporary variable for them. It also makes sure that the storage sizes of its two parameters are the same. Its memcpy(1) calls are optimized away by current compilers. Also add a conservative semantic patch for transforming only swaps of variables of the same type. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> |