Skip to content

Commit

Permalink
Merge pull request #13 from gjasny/cxx20-no-register
Browse files Browse the repository at this point in the history
drop deprecated register keyword
  • Loading branch information
willamowius authored Jan 19, 2022
2 parents e34ada8 + 1054735 commit 951539c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ptclib/random.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static unsigned redistribute(unsigned value, unsigned minimum, unsigned maximum)
unsigned PRandom::Generate()
{
if (randcnt-- == 0) {
register DWORD a,b,x,y,*m,*mm,*m2,*r,*mend;
DWORD a,b,x,y,*m,*mm,*m2,*r,*mend;
mm=randmem; r=randrsl;
a = randa; b = randb + (++randc);
for (m = mm, mend = m2 = m+(RandSize/2); m<mend; )
Expand Down
8 changes: 4 additions & 4 deletions src/ptlib/common/contain.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ void PString::Delete(PINDEX start, PINDEX len)

MakeUnique();

register PINDEX slen = GetLength();
PINDEX slen = GetLength();
if (start > slen)
return;

Expand All @@ -1178,7 +1178,7 @@ PString PString::operator()(PINDEX start, PINDEX end) const
if (end < 0 || start < 0 || end < start)
return Empty();

register PINDEX len = GetLength();
PINDEX len = GetLength();
if (start > len)
return Empty();

Expand Down Expand Up @@ -1315,7 +1315,7 @@ PINDEX PString::Find(char ch, PINDEX offset) const
if (offset < 0)
return P_MAX_INDEX;

register PINDEX len = GetLength();
PINDEX len = GetLength();
while (offset < len) {
if (InternalCompare(offset, ch) == EqualTo)
return offset;
Expand Down Expand Up @@ -1531,7 +1531,7 @@ void PString::Splice(const char * cstr, PINDEX pos, PINDEX len)
if (len < 0 || pos < 0)
return;

register PINDEX slen = GetLength();
PINDEX slen = GetLength();
if (pos >= slen)
operator+=(cstr);
else {
Expand Down

0 comments on commit 951539c

Please sign in to comment.