Commit ea25688e authored by Max Kellermann's avatar Max Kellermann

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.
parent 35a939e3
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment