Fixed a few of the simpler warnings reported by cppcheck
This commit is contained in:
parent
57cee6b09b
commit
9754d3e08b
7 changed files with 15 additions and 7 deletions
|
@ -21,12 +21,12 @@
|
|||
struct configr_of
|
||||
{
|
||||
template <typename AT>
|
||||
configr_of(const std::string& attrname, AT value)
|
||||
configr_of(const std::string& attrname, AT value) : subtags_(), data_()
|
||||
{
|
||||
this->operator()(attrname, value);
|
||||
}
|
||||
|
||||
configr_of(const config& cfg)
|
||||
configr_of(const config& cfg) : subtags_(), data_()
|
||||
{
|
||||
this->operator()(cfg);
|
||||
}
|
||||
|
|
|
@ -380,6 +380,7 @@ private:
|
|||
public:
|
||||
controller(lua_kernel_base & lk)
|
||||
: copy_button(nullptr)
|
||||
, clear_button(nullptr)
|
||||
, text_entry(nullptr)
|
||||
, text_entry_()
|
||||
, lua_model_(new lua_interpreter::lua_model(lk))
|
||||
|
|
|
@ -161,7 +161,7 @@ void listbox::set_row_shown(const unsigned row, const bool shown)
|
|||
|
||||
const int selected_row = get_selected_row();
|
||||
|
||||
bool resize_needed;
|
||||
bool resize_needed = false;
|
||||
{
|
||||
window::invalidate_layout_blocker invalidate_layout_blocker(*window);
|
||||
|
||||
|
@ -199,7 +199,7 @@ void listbox::set_row_shown(const boost::dynamic_bitset<>& shown)
|
|||
|
||||
const int selected_row = get_selected_row();
|
||||
|
||||
bool resize_needed;
|
||||
bool resize_needed = false;
|
||||
{
|
||||
window::invalidate_layout_blocker invalidate_layout_blocker(*window);
|
||||
|
||||
|
|
|
@ -150,7 +150,8 @@ class lua_filestream
|
|||
{
|
||||
public:
|
||||
lua_filestream(const std::string& fname)
|
||||
: pistream_(filesystem::istream_file(fname))
|
||||
: buff_()
|
||||
, pistream_(filesystem::istream_file(fname))
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -69,6 +69,11 @@ tod_manager& tod_manager::operator=(const tod_manager& manager)
|
|||
turn_ = manager.turn_;
|
||||
num_turns_ = manager.num_turns_;
|
||||
|
||||
has_turn_event_fired_ = manager.has_turn_event_fired_;
|
||||
has_tod_bonus_changed_= manager.has_tod_bonus_changed_;
|
||||
|
||||
random_tod_ = manager.random_tod_;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
@ -205,7 +205,8 @@ static std::shared_ptr<unit_filter_abstract_impl> construct(const vconfig & vcfg
|
|||
* unit_filter::unit_filter acts as a factory, selecting the appropriate implementation class
|
||||
*/
|
||||
unit_filter::unit_filter(const vconfig & vcfg, const filter_context * fc, bool flat_tod)
|
||||
: max_matches_(static_cast<unsigned>(-1))
|
||||
: impl_()
|
||||
, max_matches_(static_cast<unsigned>(-1))
|
||||
{
|
||||
if(vcfg) {
|
||||
max_matches_ = vcfg["limit"].to_unsigned(max_matches_);
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
unit_filter(const vconfig & cfg, const filter_context * fc, bool use_flat_tod = false); //!< Constructs a unit filter from a config and a context. This function should give the most efficient implementation available.
|
||||
|
||||
// Copy and Swap Idiom for the interface -- does not copy the underlying impl
|
||||
unit_filter(const unit_filter & o ) : impl_(o.impl_) {}
|
||||
unit_filter(const unit_filter & o ) : impl_(o.impl_), max_matches_() {}
|
||||
void swap(unit_filter & o) {
|
||||
impl_.swap(o.impl_);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue