std::vector<docstring> counter_stack_;
/// Same, but for last layout.
std::vector<Layout const *> layout_stack_;
+
+ ///
+ friend void swap(Counters &, Counters &);
};
} // namespace lyx
// Note that we do not need to call:
// tclass.counters().clearLastLayout()
// since we are saving and restoring the existing counters, etc.
- Counters const savecnt = tclass.counters();
+ Counters savecnt = tclass.counters();
tclass.counters().reset();
// we need float information even in note insets (#9760)
tclass.counters().current_float(savecnt.current_float());
tclass.counters().isSubfloat(savecnt.isSubfloat());
buffer().updateBuffer(it2, utype);
- tclass.counters() = savecnt;
+ swap(tclass.counters(), savecnt);
}
}