Browse Source

Reapply 2fec472ba2

Author: Paul Licameli <paul.licameli@audacityteam.org>
    Date:   Tue Nov 13 07:50:01 2018 -0500

        lib-src/libnyquist: eliminate register local variables
au-ny-api
Leland Lucius 2 years ago
parent
commit
19494d6277
  1. 8
      lib-src/libnyquist/nyquist/nyqstk/src/Delay.cpp
  2. 6
      lib-src/libnyquist/nyquist/nyqstk/src/Stk.cpp

8
lib-src/libnyquist/nyquist/nyqstk/src/Delay.cpp

@ -119,19 +119,19 @@ unsigned long Delay :: getDelay(void) const
StkFloat Delay :: energy(void) const
{
unsigned long i;
register StkFloat e = 0;
StkFloat e = 0;
if (inPoint_ >= outPoint_) {
for (i=outPoint_; i<inPoint_; i++) {
register StkFloat t = inputs_[i];
StkFloat t = inputs_[i];
e += t*t;
}
} else {
for (i=outPoint_; i<inputs_.size(); i++) {
register StkFloat t = inputs_[i];
StkFloat t = inputs_[i];
e += t*t;
}
for (i=0; i<inPoint_; i++) {
register StkFloat t = inputs_[i];
StkFloat t = inputs_[i];
e += t*t;
}
}

6
lib-src/libnyquist/nyquist/nyqstk/src/Stk.cpp

@ -48,7 +48,7 @@ void Stk :: setRawwavePath( std::string path )
void Stk :: swap16(unsigned char *ptr)
{
register unsigned char val;
unsigned char val;
// Swap 1st and 2nd bytes
val = *(ptr);
@ -58,7 +58,7 @@ void Stk :: swap16(unsigned char *ptr)
void Stk :: swap32(unsigned char *ptr)
{
register unsigned char val;
unsigned char val;
// Swap 1st and 4th bytes
val = *(ptr);
@ -74,7 +74,7 @@ void Stk :: swap32(unsigned char *ptr)
void Stk :: swap64(unsigned char *ptr)
{
register unsigned char val;
unsigned char val;
// Swap 1st and 8th bytes
val = *(ptr);

Loading…
Cancel
Save