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.
This commit is contained in:
Max Kellermann 2008-10-12 00:42:22 +02:00
parent 35a939e3e7
commit ea25688e46
2 changed files with 4 additions and 6 deletions

View File

@ -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);

View File

@ -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);