diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-24 12:14:35 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-24 12:48:27 +0300 |
commit | 39a4985520ebeb8c77d657e4624359a484ad330f (patch) | |
tree | 996c5891a58ad1db8921dfd84434fcf7c7b8b232 /sql/sql_string.cc | |
parent | 2a00bdeb4a65f9f56372a9f01d8bee21fe58407c (diff) | |
download | mariadb-git-39a4985520ebeb8c77d657e4624359a484ad330f.tar.gz |
Remove most 'register' use in C++
Modern compilers (such as GCC 8) emit warnings that the
'register' keyword is deprecated and not valid C++17.
Let us remove most use of the 'register' keyword.
Code in 'extra/' is not touched.
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 9808c081a54..64661f46a49 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -613,8 +613,8 @@ int String::strstr(const String &s,uint32 offset) if (!s.length()) return ((int) offset); // Empty string is always found - register const char *str = Ptr+offset; - register const char *search=s.ptr(); + const char *str = Ptr+offset; + const char *search=s.ptr(); const char *end=Ptr+str_length-s.length()+1; const char *search_end=s.ptr()+s.length(); skip: @@ -622,7 +622,7 @@ skip: { if (*str++ == *search) { - register char *i,*j; + char *i,*j; i=(char*) str; j=(char*) search+1; while (j != search_end) if (*i++ != *j++) goto skip; @@ -643,8 +643,8 @@ int String::strrstr(const String &s,uint32 offset) { if (!s.length()) return offset; // Empty string is always found - register const char *str = Ptr+offset-1; - register const char *search=s.ptr()+s.length()-1; + const char *str = Ptr+offset-1; + const char *search=s.ptr()+s.length()-1; const char *end=Ptr+s.length()-2; const char *search_end=s.ptr()-1; @@ -653,7 +653,7 @@ skip: { if (*str-- == *search) { - register char *i,*j; + char *i,*j; i=(char*) str; j=(char*) search-1; while (j != search_end) if (*i-- != *j--) goto skip; |