diff options
author | Max Kellermann <max@duempel.org> | 2008-10-12 00:42:22 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-12 00:42:22 +0200 |
commit | ea25688e463cb4471b6eaa15935b94636fa6bd1b (patch) | |
tree | 0f54efd303e58df36aca9af6159d20c792c869c6 /src | |
parent | 35a939e3e766975776ecaf99e0e46f8a3a68faf2 (diff) | |
download | mpd-ea25688e463cb4471b6eaa15935b94636fa6bd1b.tar.gz mpd-ea25688e463cb4471b6eaa15935b94636fa6bd1b.tar.xz mpd-ea25688e463cb4471b6eaa15935b94636fa6bd1b.zip |
output_buffer: converted ob_is_empty() to inline
The function ob_is_empty() is called very often. It's worth it to
convert it to an inline function.
Diffstat (limited to 'src')
-rw-r--r-- | src/outputBuffer.c | 5 | ||||
-rw-r--r-- | src/outputBuffer.h | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c index 5a397ac42..88191fd18 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -101,11 +101,6 @@ void ob_set_lazy(bool lazy) ob.lazy = lazy; } -int ob_is_empty(void) -{ - return ob.begin == ob.end; -} - void ob_shift(void) { assert(ob.begin != ob.end); diff --git a/src/outputBuffer.h b/src/outputBuffer.h index e1878196e..53c3893c9 100644 --- a/src/outputBuffer.h +++ b/src/outputBuffer.h @@ -78,7 +78,10 @@ void ob_flush(void); void ob_set_lazy(bool lazy); /** is the buffer empty? */ -int ob_is_empty(void); +static inline bool ob_is_empty(void) +{ + return ob.begin == ob.end; +} void ob_shift(void); |