[openjk] 118/130: SP: Stop using bsearch and use Q_LinearSearch in client side

Simon McVittie smcv at debian.org
Fri Oct 28 11:09:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository openjk.

commit 4eb26a88b6178df1b3cbb66b5430bae1a8f628fc
Author: Ensiform <ensiform at gmail.com>
Date:   Mon Oct 24 21:33:35 2016 -0500

    SP: Stop using bsearch and use Q_LinearSearch in client side
    
    This was already done in g_svcmds.cpp and already finished in MP but
    hadn't been merged to the SP codebases yet.
---
 code/cgame/cg_consolecmds.cpp    | 2 +-
 code/cgame/cg_servercmds.cpp     | 2 +-
 codeJK2/cgame/cg_consolecmds.cpp | 2 +-
 codeJK2/cgame/cg_servercmds.cpp  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/code/cgame/cg_consolecmds.cpp b/code/cgame/cg_consolecmds.cpp
index 454ffbf..2644832 100644
--- a/code/cgame/cg_consolecmds.cpp
+++ b/code/cgame/cg_consolecmds.cpp
@@ -269,7 +269,7 @@ Cmd_Argc() / Cmd_Argv()
 qboolean CG_ConsoleCommand( void ) {
 	consoleCommand_t	*command = NULL;
 
-	command = (consoleCommand_t *)bsearch( CG_Argv( 0 ), commands, numCommands, sizeof( commands[0] ), cmdcmp );
+	command = (consoleCommand_t *)Q_LinearSearch( CG_Argv( 0 ), commands, numCommands, sizeof( commands[0] ), cmdcmp );
 
 	if ( !command )
 		return qfalse;
diff --git a/code/cgame/cg_servercmds.cpp b/code/cgame/cg_servercmds.cpp
index 9875caf..390fe61 100644
--- a/code/cgame/cg_servercmds.cpp
+++ b/code/cgame/cg_servercmds.cpp
@@ -239,7 +239,7 @@ static void CG_ServerCommand( void ) {
 		return;
 	}
 
-	command = (serverCommand_t *)bsearch( cmd, commands, numCommands, sizeof( commands[0] ), svcmdcmp );
+	command = (serverCommand_t *)Q_LinearSearch( cmd, commands, numCommands, sizeof( commands[0] ), svcmdcmp );
 
 	if ( command ) {
 		command->func();
diff --git a/codeJK2/cgame/cg_consolecmds.cpp b/codeJK2/cgame/cg_consolecmds.cpp
index 9fbe14c..3a408b0 100644
--- a/codeJK2/cgame/cg_consolecmds.cpp
+++ b/codeJK2/cgame/cg_consolecmds.cpp
@@ -254,7 +254,7 @@ Cmd_Argc() / Cmd_Argv()
 qboolean CG_ConsoleCommand( void ) {
 	consoleCommand_t	*command = NULL;
 
-	command = (consoleCommand_t *)bsearch( CG_Argv( 0 ), commands, numCommands, sizeof( commands[0] ), cmdcmp );
+	command = (consoleCommand_t *)Q_LinearSearch( CG_Argv( 0 ), commands, numCommands, sizeof( commands[0] ), cmdcmp );
 
 	if ( !command )
 		return qfalse;
diff --git a/codeJK2/cgame/cg_servercmds.cpp b/codeJK2/cgame/cg_servercmds.cpp
index d4ddc0e..b5c4d32 100644
--- a/codeJK2/cgame/cg_servercmds.cpp
+++ b/codeJK2/cgame/cg_servercmds.cpp
@@ -292,7 +292,7 @@ static void CG_ServerCommand( void ) {
 		return;
 	}
 
-	command = (serverCommand_t *)bsearch( cmd, commands, numCommands, sizeof( commands[0] ), svcmdcmp );
+	command = (serverCommand_t *)Q_LinearSearch( cmd, commands, numCommands, sizeof( commands[0] ), svcmdcmp );
 
 	if ( command ) {
 		command->func();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git



More information about the Pkg-games-commits mailing list