From 9a7999746dda13ed1a4ac028dc76f5d6f35ef64e Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 1 Feb 2008 15:36:53 +0000 Subject: [PATCH] Remove unused macros USE_INCLUDED_STRING and STD_STRING_IS_GOOD Remove a few unused headers git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22735 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/lstrings.cpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index 520bd9343d..672608f9fa 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -14,18 +14,13 @@ #include "support/lstrings.h" #include "support/convert.h" -#include "support/debug.h" #include "support/qstring_helpers.h" #include "support/textutils.h" #include #include -#include -#include - #include -#include using namespace std; @@ -485,11 +480,8 @@ bool prefixIs(string const & a, string const & pre) if (prelen > alen || a.empty()) return false; -#if defined(STD_STRING_IS_GOOD) - return a.compare(0, prelen, pre) == 0; -#else - return ::strncmp(a.c_str(), pre.c_str(), prelen) == 0; -#endif + else + return a.compare(0, prelen, pre) == 0; } @@ -524,16 +516,10 @@ bool suffixIs(string const & a, string const & suf) { size_t const suflen = suf.length(); size_t const alen = a.length(); - if (suflen > alen) return false; - -#if !defined(USE_INCLUDED_STRING) && !defined(STD_STRING_IS_GOOD) - string tmp(a, alen - suflen); - return ::strncmp(tmp.c_str(), suf.c_str(), suflen) == 0; -#else - return a.compare(alen - suflen, suflen, suf) == 0; -#endif + else + return a.compare(alen - suflen, suflen, suf) == 0; } -- 2.39.5