Commit 3df9caf4 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

drop const qualifier to allow bracketing of lookup index

parent fa2e5ac2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -615,7 +615,7 @@ void AngleTable::uf_lookup(int type, double x, double &u, double &f)

  double fraction,a,b;
  const Table *tb = &tables[tabindex[type]];
  const int itable = static_cast<int> (x * tb->invdelta);
  int itable = static_cast<int> (x * tb->invdelta);

  if (itable < 0) itable = 0;
  if (itable >= tablength) itable = tablength-1;
@@ -650,7 +650,7 @@ void AngleTable::u_lookup(int type, double x, double &u)

  double fraction,a,b;
  const Table *tb = &tables[tabindex[type]];
  const int itable = static_cast<int> ( x * tb->invdelta);
  int itable = static_cast<int> ( x * tb->invdelta);

  if (itable < 0) itable = 0;
  if (itable >= tablength) itable = tablength-1;