VirtualBox

Ignore:
Timestamp:
Feb 1, 2019 2:47:32 PM (6 years ago)
Author:
vboxsync
Message:

Runtime: Get rid of the "register" keyword usage as all compilers we care about don't honor it for a long time already and it got deprecated in C++11 and removed entirely in C++17, fixes compile time warnings with a recent clang

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/utf-16-case.cpp

    r76553 r77118  
    4040
    4141
    42 RTDECL(int) RTUtf16ICmp(register PCRTUTF16 pwsz1, register PCRTUTF16 pwsz2)
     42RTDECL(int) RTUtf16ICmp(PCRTUTF16 pwsz1, PCRTUTF16 pwsz2)
    4343{
    4444    if (pwsz1 == pwsz2)
     
    5252    for (;;)
    5353    {
    54         register RTUTF16 wc1 = *pwsz1;
    55         register RTUTF16 wc2 = *pwsz2;
    56         register int     iDiff = wc1 - wc2;
     54        RTUTF16 wc1 = *pwsz1;
     55        RTUTF16 wc2 = *pwsz2;
     56        int     iDiff = wc1 - wc2;
    5757        if (iDiff)
    5858        {
     
    107107
    108108
    109 RTDECL(int) RTUtf16BigICmp(register PCRTUTF16 pwsz1, register PCRTUTF16 pwsz2)
     109RTDECL(int) RTUtf16BigICmp(PCRTUTF16 pwsz1, PCRTUTF16 pwsz2)
    110110{
    111111    if (pwsz1 == pwsz2)
     
    119119    for (;;)
    120120    {
    121         register RTUTF16 wc1 = *pwsz1;
    122         register RTUTF16 wc2 = *pwsz2;
    123         register int     iDiff = wc1 - wc2;
     121        RTUTF16 wc1 = *pwsz1;
     122        RTUTF16 wc2 = *pwsz2;
     123        int     iDiff = wc1 - wc2;
    124124        if (iDiff)
    125125        {
     
    217217
    218218
    219 RTDECL(int) RTUtf16NICmp(register PCRTUTF16 pwsz1, register PCRTUTF16 pwsz2, size_t cwcMax)
     219RTDECL(int) RTUtf16NICmp(PCRTUTF16 pwsz1, PCRTUTF16 pwsz2, size_t cwcMax)
    220220{
    221221    if (pwsz1 == pwsz2)
     
    229229    while (cwcMax-- > 0)
    230230    {
    231         register RTUTF16 wc1 = *pwsz1;
    232         register RTUTF16 wc2 = *pwsz2;
    233         register int     iDiff = wc1 - wc2;
     231        RTUTF16 wc1 = *pwsz1;
     232        RTUTF16 wc2 = *pwsz2;
     233        int     iDiff = wc1 - wc2;
    234234        if (iDiff)
    235235        {
     
    290290
    291291
    292 RTDECL(int) RTUtf16BigNICmp(register PCRTUTF16 pwsz1, register PCRTUTF16 pwsz2, size_t cwcMax)
     292RTDECL(int) RTUtf16BigNICmp(PCRTUTF16 pwsz1, PCRTUTF16 pwsz2, size_t cwcMax)
    293293{
    294294    if (pwsz1 == pwsz2)
     
    302302    while (cwcMax-- > 0)
    303303    {
    304         register RTUTF16 wc1 = *pwsz1;
    305         register RTUTF16 wc2 = *pwsz2;
    306         register int     iDiff = wc1 - wc2;
     304        RTUTF16 wc1 = *pwsz1;
     305        RTUTF16 wc2 = *pwsz2;
     306        int     iDiff = wc1 - wc2;
    307307        if (iDiff)
    308308        {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette