Skip to content

Commit

Permalink
Merge pull request #2464 from ianthomas23/2463_reserved_identifiers
Browse files Browse the repository at this point in the history
Rename C++ variables to avoid use of reserved identifiers
  • Loading branch information
mdboom committed Sep 30, 2013
2 parents 498e249 + 1215f78 commit 4b8ec14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/matplotlib/tri/_tri.cpp
Expand Up @@ -2177,14 +2177,14 @@ TrapezoidMapTriFinder::Trapezoid::set_upper_right(Trapezoid* upper_right_)


RandomNumberGenerator::RandomNumberGenerator(unsigned long seed)
: _M(21870), _A(1291), _C(4621), _seed(seed % _M)
: _m(21870), _a(1291), _c(4621), _seed(seed % _m)
{}

unsigned long
RandomNumberGenerator::operator()(unsigned long max_value)
{
_seed = (_seed*_A + _C) % _M;
return (_seed*max_value) / _M;
_seed = (_seed*_a + _c) % _m;
return (_seed*max_value) / _m;
}


Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/tri/_tri.h
Expand Up @@ -818,7 +818,7 @@ class RandomNumberGenerator
unsigned long operator()(unsigned long max_value);

private:
const unsigned long _M, _A, _C;
const unsigned long _m, _a, _c;
unsigned long _seed;
};

Expand Down

0 comments on commit 4b8ec14

Please sign in to comment.