ewok_rlw.h: add missing 'inline' to function definition
authorRamsay Jones <ramsay@ramsayjones.plus.com>
Sat, 27 Oct 2018 01:52:05 +0000 (02:52 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 29 Oct 2018 01:14:19 +0000 (10:14 +0900)
The 'ewok_rlw.h' header file contains the rlw_get_run_bit() function
definition, which is marked as 'static' but not 'inline'. At least when
compiled by gcc, with the default -O2 optimization level, the function
is actually inlined and leaves no static version in the ewah_bitmap.o
and ewah_rlw.o object files. Despite this, add the missing 'inline'
keyword to better describe the intended behaviour.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ewah/ewok_rlw.h
index d487966935e2d81aeece7f57f382c941d14325d7..bafa24f4c3a03318611b1b8ce591a440108de707 100644 (file)
@@ -31,7 +31,7 @@
 
 #define RLW_RUNNING_LEN_PLUS_BIT (((eword_t)1 << (RLW_RUNNING_BITS + 1)) - 1)
 
-static int rlw_get_run_bit(const eword_t *word)
+static inline int rlw_get_run_bit(const eword_t *word)
 {
        return *word & (eword_t)1;
 }