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:
parent
35a939e3e7
commit
ea25688e46
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user