diff options
author | Sven Gothel <[email protected]> | 2022-10-25 19:55:02 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-10-25 19:55:02 +0200 |
commit | 2d8ca1e07e534b071ea161bb85c6d96aed94a0e0 (patch) | |
tree | 4e13daf82a5237c79984ab625124fdef20b6d67f /src/jaulibs/sortstr.cpp | |
parent | 95f8bfda86a59117e13a8af81bab9bdec19d3a7b (diff) |
C++17 fixes for old jaulib/*cpp files (not used here)
Diffstat (limited to 'src/jaulibs/sortstr.cpp')
-rw-r--r-- | src/jaulibs/sortstr.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jaulibs/sortstr.cpp b/src/jaulibs/sortstr.cpp index 9946ac6..1ed3b57 100644 --- a/src/jaulibs/sortstr.cpp +++ b/src/jaulibs/sortstr.cpp @@ -33,6 +33,8 @@ # include "sortlist.h" # include "strclass.h" +#include <cstring> + /*------------------------------------------------------------------------------ Variante fuer StrClass der Methode findeIndex der template @@ -88,7 +90,7 @@ else *o == x => i=o, done ------------------------------------------------------------------------------*/ -int SortListe<StrClass>::findeIndex(const StrClass &x, int &u, int &o) const +template<> int SortListe<StrClass>::findeIndex(const StrClass &x, int &u, int &o) const { int i=0; int done=0; @@ -98,8 +100,8 @@ int SortListe<StrClass>::findeIndex(const StrClass &x, int &u, int &o) const if ( (*this).laenge() == 0 ) return -1; //Anfangsgrenzen austesten - result_o=strcmp( (*this)[o].GetStrPtr(), x.GetStrPtr() ); - result_u=strcmp( (*this)[u].GetStrPtr(), x.GetStrPtr() ); + result_o=strcmp( (*this)[o].getStrPtr(), x.getStrPtr() ); + result_u=strcmp( (*this)[u].getStrPtr(), x.getStrPtr() ); if(Type==UP) { if( u == o && result_o < 0 ) o++; @@ -119,7 +121,7 @@ int SortListe<StrClass>::findeIndex(const StrClass &x, int &u, int &o) const while ( !done && o-u>1) { i=(u+o)/2; - result=strcmp( (*this)[i].GetStrPtr(), x.GetStrPtr() ); + result=strcmp( (*this)[i].getStrPtr(), x.getStrPtr() ); if ( result < 0 ) { if ( Type==UP ) u=i; |