mirror of
https://github.com/Z3Prover/z3
synced 2026-06-11 03:15:36 +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
|
|
@ -26,10 +26,10 @@ Revision History:
|
|||
#include "ast/ast.h"
|
||||
|
||||
class expr_offset {
|
||||
expr * m_expr;
|
||||
unsigned m_offset;
|
||||
expr * m_expr = nullptr;
|
||||
unsigned m_offset = 0;
|
||||
public:
|
||||
expr_offset():m_expr(nullptr), m_offset(0) {}
|
||||
expr_offset() = default;
|
||||
expr_offset(expr * e, unsigned o):m_expr(e), m_offset(o) {}
|
||||
|
||||
expr * get_expr() const { return m_expr; }
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@ template<typename T>
|
|||
class expr_offset_map {
|
||||
struct data {
|
||||
T m_data;
|
||||
unsigned m_timestamp;
|
||||
data():m_timestamp(0) {}
|
||||
unsigned m_timestamp = 0;
|
||||
};
|
||||
vector<svector<data> > m_map;
|
||||
unsigned m_timestamp;
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@ class var_offset_map {
|
|||
protected:
|
||||
struct data {
|
||||
T m_data;
|
||||
unsigned m_timestamp;
|
||||
data():m_timestamp(0) {}
|
||||
unsigned m_timestamp = 0;
|
||||
};
|
||||
|
||||
svector<data> m_map;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue