Skip to content

Address (most) warnings on Clang #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions source/bxbrio/include/brio/detail/TArrayCMod.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ class TArrayCMod

public:
TArrayCMod();
virtual ~TArrayCMod();
~TArrayCMod() override;
void Reserve(Int_t n);
void Clear();
void Set(Int_t n);
void Set(Int_t n) override;

// Mandatory by TArray inheritance:
Double_t GetAt(Int_t /*i*/) const {return 0.0;}
void SetAt(Double_t /*x*/, Int_t /*i*/) {return;}
Double_t GetAt(Int_t /*i*/) const override {return 0.0;}
void SetAt(Double_t /*x*/, Int_t /*i*/) override {return;}

// Workaround
private:
void _Streamer_(TBuffer &b);
ClassDef(TArrayCMod,1) //Array of chars
ClassDefOverride(TArrayCMod,1) //Array of chars
};

#endif // BRIO_DETAIL_TARRAYCMOD_H
Expand Down
6 changes: 3 additions & 3 deletions source/bxbrio/include/brio/detail/base_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace brio {

base_io(int rw_, int format_, datatools::logger::priority p_);

virtual ~base_io();
~base_io() override;

//! File open
virtual void open(const std::string & filename_);
Expand Down Expand Up @@ -127,10 +127,10 @@ namespace brio {

void get_list_of_stores(std::list<std::string> & list_) const;

virtual void tree_dump(std::ostream & out_ = std::clog,
void tree_dump(std::ostream & out_ = std::clog,
const std::string & title_ = "",
const std::string & indent_ = "",
bool inherit_ = false) const;
bool inherit_ = false) const override;

void reset();

Expand Down
4 changes: 2 additions & 2 deletions source/bxbrio/include/brio/detail/brio_record.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ class brio_record
brio_record();

//! Destructor
virtual ~brio_record();
~brio_record() override;

//! Reset the internal data
void reset();

ClassDef(brio_record,1) // Basic BRIO record
ClassDefOverride(brio_record,1) // Basic BRIO record

};

Expand Down
8 changes: 4 additions & 4 deletions source/bxbrio/include/brio/reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace brio {
datatools::logger::priority p_ = datatools::logger::PRIO_FATAL);

//! Destructor
virtual ~reader();
~reader() override;

/** By default, serialization tag are checked each time
* an object is deserialized.
Expand Down Expand Up @@ -113,16 +113,16 @@ namespace brio {
int load(T & data_, const std::string & label_, int64_t nentry_ = -1);

//! Smart print
virtual void tree_dump(std::ostream & out_ = std::clog,
void tree_dump(std::ostream & out_ = std::clog,
const std::string & title_ = "",
const std::string & indent_ = "",
bool inherit_ = false) const;
bool inherit_ = false) const override;

//! Print
void print_info(std::ostream& out_ = std::clog) const;

protected:
virtual void _at_open(const std::string & filename_);
void _at_open(const std::string & filename_) override;

template<class T>
int _at_load(T & data_, store_info * ptr_si_, int64_t nentry_);
Expand Down
8 changes: 4 additions & 4 deletions source/bxbrio/include/brio/writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace brio {
datatools::logger::priority p_ = datatools::logger::PRIO_FATAL);

//! Destructor
virtual ~writer();
~writer() override;

//! Lock the writer
void lock();
Expand Down Expand Up @@ -125,10 +125,10 @@ namespace brio {
int store(const T & data_, const std::string & label_ = "");

//! Smart print
virtual void tree_dump(std::ostream & out_ = std::clog,
void tree_dump(std::ostream & out_ = std::clog,
const std::string & title_ = "",
const std::string & indent_ = "",
bool inherit_ = false) const;
bool inherit_ = false) const override;

//! Print
void print_info(std::ostream & out_ = std::clog) const;
Expand All @@ -144,7 +144,7 @@ namespace brio {
template <typename T>
int _at_store(const T & dat, store_info * store_info_);

virtual void _at_open(const std::string & filename_);
void _at_open(const std::string & filename_) override;

private:

Expand Down
10 changes: 5 additions & 5 deletions source/bxcuts/include/cuts/accept_cut.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ namespace cuts {
datatools::logger::PRIO_FATAL);

/// Destructor
virtual ~accept_cut();
~accept_cut() override;

/// Initialization
virtual void initialize(const datatools::properties &,
void initialize(const datatools::properties &,
datatools::service_manager &,
cuts::cut_handle_dict_type &);
cuts::cut_handle_dict_type &) override;

/// Reset
virtual void reset();
void reset() override;

protected :

/// Selection
virtual int _accept();
int _accept() override;

private:

Expand Down
4 changes: 2 additions & 2 deletions source/bxcuts/include/cuts/and_cut.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ namespace cuts {
datatools::logger::PRIO_FATAL);

/// Destructor
virtual ~and_cut();
~and_cut() override;

protected :

/// Selection
virtual int _accept();
int _accept() override;

private:

Expand Down
6 changes: 3 additions & 3 deletions source/bxcuts/include/cuts/cut_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace cuts {
cut_manager(uint32_t the_flags = BLANK);

/// Destructor
virtual ~cut_manager();
~cut_manager() override;

/// Check availability of the service manager
bool has_service_manager() const;
Expand All @@ -132,10 +132,10 @@ namespace cuts {
void install_service_manager(const datatools::properties & a_service_manager_configuration);

/// Smart print
virtual void tree_dump(std::ostream & a_out = std::clog,
void tree_dump(std::ostream & a_out = std::clog,
const std::string & a_title = "",
const std::string & a_indent = "",
bool a_inherit = false) const;
bool a_inherit = false) const override;

/// Print report
void print_report(std::ostream & a_out = std::clog) const;
Expand Down
14 changes: 7 additions & 7 deletions source/bxcuts/include/cuts/cut_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,26 @@ namespace cuts {
void set_cut_manager (const cut_manager & a_cut_manager);

/// Check the initialization status
virtual bool is_initialized () const;
bool is_initialized () const override;

/// Initialize the service through a collection of setup properties
virtual int initialize (const datatools::properties & a_config,
datatools::service_dict_type & a_service_dict);
int initialize (const datatools::properties & a_config,
datatools::service_dict_type & a_service_dict) override;

/// Reset
virtual int reset ();
int reset () override;

/// Constructor
cut_service ();

/// Destructor
virtual ~cut_service ();
~cut_service () override;

/// Smart print
virtual void tree_dump (std::ostream & a_out = std::clog,
void tree_dump (std::ostream & a_out = std::clog,
const std::string & a_title = "",
const std::string & a_indent = "",
bool a_inherit = false) const;
bool a_inherit = false) const override;

private:

Expand Down
4 changes: 2 additions & 2 deletions source/bxcuts/include/cuts/cut_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ namespace cuts {
cut_handle_type & grab_initialized_cut_handle();

/// Smart print
virtual void tree_dump(std::ostream & out_ = std::clog,
void tree_dump(std::ostream & out_ = std::clog,
const std::string & title_ = "",
const std::string & indent_ = "",
bool inherit_ = false) const;
bool inherit_ = false) const override;

private:

Expand Down
4 changes: 2 additions & 2 deletions source/bxcuts/include/cuts/exclude_cut.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ namespace cuts {
datatools::logger::PRIO_FATAL);

/// Destructor
virtual ~exclude_cut();
~exclude_cut() override;

protected :

/// Selection
virtual int _accept();
int _accept() override;

private:

Expand Down
20 changes: 10 additions & 10 deletions source/bxcuts/include/cuts/i_binary_cut.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,35 @@ namespace cuts {
datatools::logger::PRIO_FATAL);

/// Destructor
virtual ~i_binary_cut();
~i_binary_cut() override;

/// Initialization
virtual void initialize(const datatools::properties &,
void initialize(const datatools::properties &,
datatools::service_manager &,
cuts::cut_handle_dict_type &);
cuts::cut_handle_dict_type &) override;

/// Export to a container of properties
virtual void export_to_config(datatools::properties & config_,
void export_to_config(datatools::properties & config_,
uint32_t flags_ = i_cut::EXPORT_CONFIG_DEFAULT,
const std::string & prefix_ = "") const;
const std::string & prefix_ = "") const override;

/// Reset
virtual void reset();
void reset() override;

/// Smart print
virtual void tree_dump (std::ostream & a_out = std::clog,
void tree_dump (std::ostream & a_out = std::clog,
const std::string & a_title = "",
const std::string & a_indent = "",
bool a_inherit = false) const;
bool a_inherit = false) const override;

protected:

void _install_cuts(const datatools::properties & a_configuration,
cuts::cut_handle_dict_type & a_cut_dict);

virtual void _at_set_user_data();
void _at_set_user_data() override;

virtual void _at_reset_user_data();
void _at_reset_user_data() override;

void _reset_cuts();

Expand Down
16 changes: 8 additions & 8 deletions source/bxcuts/include/cuts/i_cut.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ namespace cuts {
);
return *_address;
}
virtual const std::type_info * get_typeinfo() const {
const std::type_info * get_typeinfo() const override {
return _ti;
}
virtual bool match(const std::type_info * tit_) const {
bool match(const std::type_info * tit_) const override {
return tit_ == _ti;
}
void set(const T & obj) {
_address = &obj;
_ti = &typeid(T);
}
virtual operator bool() const {
operator bool() const override {
return _address != 0 && _ti != 0;
}
void reset() {
Expand All @@ -106,7 +106,7 @@ namespace cuts {
referenced_data(const T & obj) {
set(obj);
}
virtual ~referenced_data() {
~referenced_data() override {
_address = 0;
_ti = 0;
}
Expand Down Expand Up @@ -293,13 +293,13 @@ namespace cuts {
explicit i_cut(datatools::logger::priority p = datatools::logger::PRIO_FATAL);

//! Destructor
virtual ~i_cut();
~i_cut() override;

//! Smart print
virtual void tree_dump(std::ostream & a_out = std::clog,
void tree_dump(std::ostream & a_out = std::clog,
const std::string & a_title = "",
const std::string & a_indent = "",
bool a_inherit = false) const;
bool a_inherit = false) const override;

//! Print shortcut @see tree_dump()
void print(std::ostream & a_out = std::clog) const;
Expand Down Expand Up @@ -410,7 +410,7 @@ namespace cuts {
/** Interface macro for automated registration of a cut class in the global register */
#define CUT_REGISTRATION_INTERFACE(T) \
public: \
virtual std::string get_type_id() const; \
std::string get_type_id() const override; \
private: \
DATATOOLS_FACTORY_SYSTEM_AUTO_REGISTRATION_INTERFACE(::cuts::i_cut, T) \
/**/
Expand Down
16 changes: 8 additions & 8 deletions source/bxcuts/include/cuts/i_multi_cut.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,29 @@ namespace cuts {
datatools::logger::PRIO_FATAL);

/// Destructor
virtual ~i_multi_cut();
~i_multi_cut() override;

/// Initialization
virtual void initialize(const datatools::properties &,
void initialize(const datatools::properties &,
datatools::service_manager &,
cuts::cut_handle_dict_type &);
cuts::cut_handle_dict_type &) override;

/// Export to a container of properties
virtual void export_to_config(datatools::properties & config_,
void export_to_config(datatools::properties & config_,
uint32_t flags_ = i_cut::EXPORT_CONFIG_DEFAULT,
const std::string & prefix_ = "") const;
const std::string & prefix_ = "") const override;

/// Reset
virtual void reset();
void reset() override;

protected:

void _install_cuts(const datatools::properties & a_configuration,
cuts::cut_handle_dict_type & a_cut_dict);

virtual void _at_set_user_data();
void _at_set_user_data() override;

virtual void _at_reset_user_data();
void _at_reset_user_data() override;

void _reset_cuts();

Expand Down
Loading