mirror of
https://github.com/Z3Prover/z3
synced 2026-02-11 19:34:32 +00:00
Remove redundant default constructors when they're the only constructor (#8461)
* Initial plan * Modernize C++ constructors to use C++11 default member initialization - Phase 1 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Fix theory_pb.h struct definition - move reset() back inside struct Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Modernize C++ constructors to use C++11 default member initialization - Phase 2 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Fix opt_solver.h - revert rational initialization (complex type) Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Modernize C++ constructors to use C++11 default member initialization - Phase 3 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Fix sparse_matrix.h - explicitly initialize union member in default constructor Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Remove unnecessary default constructors when they're the only constructor Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
This commit is contained in:
parent
04ec450b02
commit
23c531a4c1
24 changed files with 82 additions and 101 deletions
|
|
@ -74,13 +74,13 @@ namespace simplex {
|
|||
with the column entry.
|
||||
*/
|
||||
struct col_entry {
|
||||
int m_row_id;
|
||||
int m_row_id = 0;
|
||||
union {
|
||||
int m_row_idx;
|
||||
int m_next_free_col_entry_idx;
|
||||
};
|
||||
col_entry(int r, int i): m_row_id(r), m_row_idx(i) {}
|
||||
col_entry(): m_row_id(0), m_row_idx(0) {}
|
||||
col_entry(): m_row_idx(0) {}
|
||||
bool is_dead() const { return (unsigned) m_row_id == dead_id; }
|
||||
};
|
||||
|
||||
|
|
@ -115,11 +115,10 @@ namespace simplex {
|
|||
*/
|
||||
struct column {
|
||||
svector<col_entry> m_entries;
|
||||
unsigned m_size;
|
||||
int m_first_free_idx;
|
||||
mutable unsigned m_refs;
|
||||
unsigned m_size = 0;
|
||||
int m_first_free_idx = -1;
|
||||
mutable unsigned m_refs = 0;
|
||||
|
||||
column():m_size(0), m_first_free_idx(-1), m_refs(0) {}
|
||||
unsigned size() const { return m_size; }
|
||||
unsigned num_entries() const { return m_entries.size(); }
|
||||
void reset();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue