Skip to content

Commit

Permalink
avoid using variable "dtype"
Browse files Browse the repository at this point in the history
  • Loading branch information
tnakazato committed Nov 18, 2022
1 parent 7b0ee0e commit fa28bb8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions libsakura/test/lsq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1618,10 +1618,9 @@ void Prologue(TestCase &tc, TestCase const &default_tc, ParamSet &ps) {
for (size_t i = 0; i < tc.param.size(); ++i) {
param = tc.param[i];
name = param.name;
PDType const dtype = param.data_type;
default_param = default_tc.param[i];
assert(name == default_param.name);
assert(dtype == default_param.data_type);
assert(param.data_type == default_param.data_type);
vtype = param.value_type;
if (vtype == PVType_kNULL) {
if ((tc.api_name == ApiName_kCreateLSQFitContextPolynomialFloat)
Expand Down Expand Up @@ -1657,9 +1656,9 @@ void Prologue(TestCase &tc, TestCase const &default_tc, ParamSet &ps) {
== ApiName_kCreateLSQFitContextCubicSplineFloat)
|| (tc.api_name
== ApiName_kCreateLSQFitContextSinusoidFloat)) {
assert(dtype == PDType_kContextPointerPointer);
assert(param.data_type == PDType_kContextPointerPointer);
} else {
assert(dtype == PDType_kContextPointer);
assert(param.data_type == PDType_kContextPointer);
for (size_t j = 0; j < LsqFuncTypeStr.size(); ++j) {
if (desc_has(LsqFuncTypeStr[j])) {
ps.ctxt[name] = ps.ctxt[LsqFuncTypeStr[j]];
Expand Down

0 comments on commit fa28bb8

Please sign in to comment.