diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-30 20:17:34 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-03 21:07:35 +0100 |
commit | 05dbf5c0b1a80c03fd332cf9cd81e9247c1d7063 (patch) | |
tree | 2c8a0378f3e85768b4d9c291865fa1c4dbe435a7 /kdecore | |
parent | 119bb1250355503e9b7f71b294cc502e7a9d6d95 (diff) | |
download | tdelibs-05dbf5c0b1a80c03fd332cf9cd81e9247c1d7063.tar.gz tdelibs-05dbf5c0b1a80c03fd332cf9cd81e9247c1d7063.zip |
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit aa98dbfe80580169f3df12489a77e8b904a1d9b9)
Diffstat (limited to 'kdecore')
-rw-r--r-- | kdecore/kbufferedio.cpp | 2 | ||||
-rw-r--r-- | kdecore/kconfigbackend.cpp | 10 | ||||
-rw-r--r-- | kdecore/kentities.c | 12 | ||||
-rw-r--r-- | kdecore/kextsock.cpp | 2 | ||||
-rw-r--r-- | kdecore/klocale.cpp | 6 | ||||
-rw-r--r-- | kdecore/kmdcodec.cpp | 2 | ||||
-rw-r--r-- | kdecore/kstringhandler.cpp | 2 | ||||
-rw-r--r-- | kdecore/ksycocadict.cpp | 12 |
8 files changed, 24 insertions, 24 deletions
diff --git a/kdecore/kbufferedio.cpp b/kdecore/kbufferedio.cpp index 951c41244..89706a78d 100644 --- a/kdecore/kbufferedio.cpp +++ b/kdecore/kbufferedio.cpp @@ -174,7 +174,7 @@ int KBufferedIO::unreadBlock(const char *data, uint len) unsigned KBufferedIO::consumeReadBuffer(unsigned nbytes, char *destbuffer, bool discard) { { - register unsigned u = readBufferSize(); + unsigned u = readBufferSize(); if (nbytes > u) nbytes = u; // we can't consume more than there is } diff --git a/kdecore/kconfigbackend.cpp b/kdecore/kconfigbackend.cpp index 5939c6d9d..7df9930ca 100644 --- a/kdecore/kconfigbackend.cpp +++ b/kdecore/kconfigbackend.cpp @@ -114,8 +114,8 @@ static TQCString printableToString(const char *str, int l) static TQCString stringToPrintable(const TQCString& str){ TQCString result(str.length()*2); // Maximum 2x as long as source string - register char *r = const_cast<TQCString&>(result).data(); - register char *s = const_cast<TQCString&>(str).data(); + char *r = const_cast<TQCString&>(result).data(); + char *s = const_cast<TQCString&>(str).data(); if (!s) return TQCString(""); @@ -166,7 +166,7 @@ static TQCString stringToPrintable(const TQCString& str){ static TQCString decodeGroup(const char*s, int l) { TQCString result(l); - register char *r = result.data(); + char *r = result.data(); l--; // Correct for trailing \0 while(l) @@ -198,8 +198,8 @@ static TQCString encodeGroup(const TQCString &str) { int l = str.length(); TQCString result(l*2+1); - register char *r = const_cast<TQCString&>(result).data(); - register char *s = const_cast<TQCString&>(str).data(); + char *r = const_cast<TQCString&>(result).data(); + char *s = const_cast<TQCString&>(str).data(); while(l) { if ((*s == '[') || (*s == ']')) diff --git a/kdecore/kentities.c b/kdecore/kentities.c index 8181e5a6c..8ed4826e6 100644 --- a/kdecore/kentities.c +++ b/kdecore/kentities.c @@ -73,7 +73,7 @@ inline #endif #endif static unsigned int -hash_Entity (register const char *str, register unsigned int len) +hash_Entity (register const char *str, unsigned int len) { static const unsigned short asso_values[] = { @@ -104,7 +104,7 @@ hash_Entity (register const char *str, register unsigned int len) 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932 }; - register int hval = len; + int hval = len; switch (hval) { @@ -140,7 +140,7 @@ hash_Entity (register const char *str, register unsigned int len) __inline #endif const struct entity * -kde_findEntity (register const char *str, register unsigned int len) +kde_findEntity (register const char *str, unsigned int len) { enum { @@ -815,15 +815,15 @@ kde_findEntity (register const char *str, register unsigned int len) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - register int key = hash_Entity (str, len); + int key = hash_Entity (str, len); if (key <= MAX_HASH_VALUE && key >= 0) { - register int index = lookup[key]; + int index = lookup[key]; if (index >= 0) { - register const char *s = wordlist_Entity[index].name; + const char *s = wordlist_Entity[index].name; if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0') return &wordlist_Entity[index]; diff --git a/kdecore/kextsock.cpp b/kdecore/kextsock.cpp index fc398ef2a..84c6b9718 100644 --- a/kdecore/kextsock.cpp +++ b/kdecore/kextsock.cpp @@ -1509,7 +1509,7 @@ TQT_TQIO_LONG KExtendedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG len // LOCK BUFFER MUTEX - register unsigned wsize = writeBufferSize(); + unsigned wsize = writeBufferSize(); if (d->outMaxSize == (int)wsize) // (int) to get rid of annoying warning { // buffer is full! diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp index 4a4d845f5..33dc4c26c 100644 --- a/kdecore/klocale.cpp +++ b/kdecore/klocale.cpp @@ -1976,7 +1976,7 @@ TQString KLocale::formatDateTime(const TQDateTime &pDateTime, TQString i18n(const char* text) { - register KLocale *instance = KGlobal::locale(); + KLocale *instance = KGlobal::locale(); if (instance) return instance->translate(text); return TQString::fromUtf8(text); @@ -1984,7 +1984,7 @@ TQString i18n(const char* text) TQString i18n(const char* index, const char *text) { - register KLocale *instance = KGlobal::locale(); + KLocale *instance = KGlobal::locale(); if (instance) return instance->translate(index, text); return TQString::fromUtf8(text); @@ -1992,7 +1992,7 @@ TQString i18n(const char* index, const char *text) TQString i18n(const char* singular, const char* plural, unsigned long n) { - register KLocale *instance = KGlobal::locale(); + KLocale *instance = KGlobal::locale(); if (instance) return instance->translate(singular, plural, n); if (n == 1) diff --git a/kdecore/kmdcodec.cpp b/kdecore/kmdcodec.cpp index 48afddb09..9b74c53b0 100644 --- a/kdecore/kmdcodec.cpp +++ b/kdecore/kmdcodec.cpp @@ -139,7 +139,7 @@ const unsigned int KCodecs::maxQPLineLength = 70; // strchr(3) for broken systems. static int rikFindChar(register const char * _s, const char c) { - register const char * s = _s; + const char * s = _s; while (true) { diff --git a/kdecore/kstringhandler.cpp b/kdecore/kstringhandler.cpp index d33c3c924..2c70504d3 100644 --- a/kdecore/kstringhandler.cpp +++ b/kdecore/kstringhandler.cpp @@ -567,7 +567,7 @@ TQString KStringHandler::obscure( const TQString &str ) bool KStringHandler::isUtf8(const char *buf) { int i, n; - register unsigned char c; + unsigned char c; bool gotone = false; if (!buf) diff --git a/kdecore/ksycocadict.cpp b/kdecore/ksycocadict.cpp index d1deb609b..344a4009f 100644 --- a/kdecore/ksycocadict.cpp +++ b/kdecore/ksycocadict.cpp @@ -182,7 +182,7 @@ uint KSycocaDict::hashKey( const TQString &key) { int l = key.length(); - register uint h = 0; + uint h = 0; for(uint i = 0; i < mHashList.count(); i++) { @@ -217,10 +217,10 @@ calcDiversity(KSycocaDictStringList *d, int pos, int sz) pos = -pos-1; for(string_entry *entry=d->first(); entry; entry = d->next()) { - register int l = entry->length; + int l = entry->length; if (pos < l && pos != 0) { - register uint hash = ((entry->hash * 13) + (entry->key[l-pos].cell() % 29)) & 0x3ffffff; + uint hash = ((entry->hash * 13) + (entry->key[l-pos].cell() % 29)) & 0x3ffffff; matrix[ hash % usz ] = true; } } @@ -232,7 +232,7 @@ calcDiversity(KSycocaDictStringList *d, int pos, int sz) { if (pos < entry->length) { - register uint hash = ((entry->hash * 13) + (entry->key[pos].cell() % 29)) & 0x3ffffff; + uint hash = ((entry->hash * 13) + (entry->key[pos].cell() % 29)) & 0x3ffffff; matrix[ hash % usz ] = true; } } @@ -257,7 +257,7 @@ addDiversity(KSycocaDictStringList *d, int pos) pos = -pos-1; for(string_entry *entry=d->first(); entry; entry = d->next()) { - register int l = entry->length; + int l = entry->length; if (pos < l) entry->hash = ((entry->hash * 13) + (entry->key[l-pos].cell() % 29)) & 0x3fffffff; } @@ -306,7 +306,7 @@ KSycocaDict::save(TQDataStream &str) // use "almost prime" number for sz (to calculate diversity) and later // for the table size of big tables // int sz = d->count()*5-1; - register unsigned int sz = count()*4 + 1; + unsigned int sz = count()*4 + 1; while(!(((sz % 3) && (sz % 5) && (sz % 7) && (sz % 11) && (sz % 13)))) sz+=2; int maxDiv = 0; |