@@ -272,7 +272,7 @@ class Jtc {
272272 void jsonized_output_obj_ (Json::iterator &, Json &jref, Grouping);
273273 void jsonized_output_ary_ (Json::iterator &, Json &jref, Grouping);
274274 void merge_ns_ (Json::map_jn &to, const Json::map_jn &from)
275- { for (auto & ns: from) to[ns.KEY ] = ns.VALUE ; }
275+ { for (const auto & ns: from) to[ns.KEY ] = ns.VALUE ; }
276276 bool shell_callback_ (const std::string &lxm, Json::iterator jit) {
277277 // reminder:
278278 // typedef std::function<bool(const std::string &, const Jnode &)> uws_callback;
@@ -1054,8 +1054,8 @@ void Jtc::output_by_iterator(Json::iterator &wi, Grouping grp) {
10541054 tmp.type (Jnode::Neither);
10551055 DBG ().increment (+2 , tmp, -2 );
10561056
1057- wns_[&wi][WLK_HPFX] = move (hwlk_); // merge prior hist. into namespace
1058- hwlk_.type (Jnode::Neither);
1057+ wns_[&wi][WLK_HPFX] = move (hwlk_[ 0 ]); // merge prior hist. into namespace
1058+ hwlk_[ 0 ] .type (Jnode::Neither);
10591059 if (opt_[CHR (OPT_TMP)].hits () >= 1 ) { // -T given, interpolate
10601060 merge_ns_ (cr_.global_ns (), wns_[&wi]);
10611061 // if multiple interleaved walks and multiple templates, then relate each template per walk-path
@@ -1074,7 +1074,7 @@ void Jtc::output_by_iterator(Json::iterator &wi, Grouping grp) {
10741074 if (++key_ >= opt_[CHR (OPT_TMP)].size () - 1 ) key_ = 0 ; // -1: adjust b/c of opt_'s default
10751075 }
10761076 }
1077- if (hwlk_.is_neither ()) { // templating failed or was none
1077+ if (hwlk_[ 0 ] .is_neither ()) { // templating failed or was none
10781078 if (wi->has_label ()) hwlk_ = move (OBJ{LBL{wi->label (), *wi}}); // preserve also the label if exist
10791079 else hwlk_ = move (ARY{*wi});
10801080 }
@@ -1537,8 +1537,7 @@ void Jtc::update_wlk_history_(Json::iterator & jit) {
15371537 // now stores result of interpolation
15381538
15391539 wns_[&jit] = jinp_.ns (); // preserve walked namespace
1540- wns_[&jit][WLK_HPFX] = move (hwlk_); // add historical namespace
1541- hwlk_ = *jit; // preserve current walk
1540+ wns_[&jit][WLK_HPFX] = move (hwlk_[0 ]); // add historical namespace
15421541 if (jit->has_label ()) hwlk_ = move (OBJ{LBL{jit->label (), *jit}});
15431542 else hwlk_ = move (ARY{*jit});
15441543}
0 commit comments