From 25ebab2e09ec5eaa8ad799903a492524302a9d0e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 23 May 2002 05:42:51 +0000 Subject: [PATCH] only call Cbuf_ExecuteStack when the buffer has anything to execute. this gives an ~1.1% boost to overkill. --- libs/util/cmd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/util/cmd.c b/libs/util/cmd.c index a5e8757fe..eab1218fb 100644 --- a/libs/util/cmd.c +++ b/libs/util/cmd.c @@ -589,9 +589,12 @@ Cbuf_Execute (void) } Cbuf_ExecuteStack (t->cbuf); } - Cbuf_ExecuteStack (cmd_keybindbuffer); - Cbuf_ExecuteStack (cmd_consolebuffer); - Cbuf_ExecuteStack (cmd_legacybuffer); + if (cmd_keybindbuffer->buffer->str[0] || cmd_keybindbuffer->next) + Cbuf_ExecuteStack (cmd_keybindbuffer); + if (cmd_consolebuffer->buffer->str[0] || cmd_consolebuffer->next) + Cbuf_ExecuteStack (cmd_consolebuffer); + if (cmd_legacybuffer->buffer->str[0] || cmd_legacybuffer->next) + Cbuf_ExecuteStack (cmd_legacybuffer); } /*