From 7e116c2738131f88ec001f415ba254fa79b4f44c Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 1 Jan 2016 16:26:12 +0100 Subject: [PATCH] Changed: Replaced substr == by compare, because more optimized (thanks to Kaetemi for the hint!) --- .../mission_manager/mission_step_template.cpp | 4 ++-- .../mission_manager/mission_template.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp index a042da852..179bea350 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp @@ -104,7 +104,7 @@ uint32 IMissionStepTemplate::sendRpStepText(CCharacter * user,const std::vector< _User = user; - if (_RoleplayText.substr(0, 6) == "WEBIG_") + if (_RoleplayText.compare(0, 6, "WEBIG_") == 0) { TVectorParamCheck params; string name = _RoleplayText; @@ -174,7 +174,7 @@ uint32 IMissionStepTemplate::sendStepText(CCharacter * user,const std::vector