mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-13 17:53:11 +02:00
Copy c'tor / operator= safety.
Also fixes a memory leak of search pane handlers.
This commit is contained in:
parent
a7ab02224e
commit
8c85cd43f3
@ -115,6 +115,11 @@ public:
|
||||
|
||||
~BVH_PBRT();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
BVH_PBRT( const BVH_PBRT& ) = delete;
|
||||
BVH_PBRT& operator=( const BVH_PBRT& ) = delete;
|
||||
|
||||
bool Intersect( const RAY& aRay, HITINFO& aHitInfo ) const override;
|
||||
bool Intersect( const RAY& aRay, HITINFO& aHitInfo, unsigned int aAccNodeInfo ) const override;
|
||||
bool Intersect( const RAYPACKET& aRayPacket, HITINFO_PACKET* aHitInfoPacket ) const override;
|
||||
|
@ -22,12 +22,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file container_2d.h
|
||||
*/
|
||||
|
||||
#ifndef _CONTAINER_2D_H_
|
||||
#define _CONTAINER_2D_H_
|
||||
#pragma once
|
||||
|
||||
#include "../shapes2D/object_2d.h"
|
||||
#include <list>
|
||||
@ -71,8 +66,7 @@ public:
|
||||
* @param aBBox The bounding box to test.
|
||||
* @param aOutList The list of objects that intersects the bounding box.
|
||||
*/
|
||||
virtual void GetIntersectingObjects( const BBOX_2D& aBBox,
|
||||
CONST_LIST_OBJECT2D& aOutList ) const = 0;
|
||||
virtual void GetIntersectingObjects( const BBOX_2D& aBBox, CONST_LIST_OBJECT2D& aOutList ) const = 0;
|
||||
|
||||
/**
|
||||
* Intersect and check if a segment ray hits a object or is inside it.
|
||||
@ -83,11 +77,11 @@ public:
|
||||
virtual bool IntersectAny( const RAYSEG2D& aSegRay ) const = 0;
|
||||
|
||||
protected:
|
||||
BBOX_2D m_bbox;
|
||||
BBOX_2D m_bbox;
|
||||
LIST_OBJECT2D m_objects;
|
||||
|
||||
private:
|
||||
std::mutex m_lock;
|
||||
std::mutex m_lock;
|
||||
};
|
||||
|
||||
|
||||
@ -96,8 +90,7 @@ class CONTAINER_2D : public CONTAINER_2D_BASE
|
||||
public:
|
||||
CONTAINER_2D();
|
||||
|
||||
void GetIntersectingObjects( const BBOX_2D& aBBox,
|
||||
CONST_LIST_OBJECT2D& aOutList ) const override;
|
||||
void GetIntersectingObjects( const BBOX_2D& aBBox, CONST_LIST_OBJECT2D& aOutList ) const override;
|
||||
|
||||
bool IntersectAny( const RAYSEG2D& aSegRay ) const override;
|
||||
};
|
||||
@ -119,28 +112,30 @@ public:
|
||||
BVH_CONTAINER_2D();
|
||||
~BVH_CONTAINER_2D();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
BVH_CONTAINER_2D( const BVH_CONTAINER_2D& ) = delete;
|
||||
BVH_CONTAINER_2D& operator=( const BVH_CONTAINER_2D& ) = delete;
|
||||
|
||||
void BuildBVH();
|
||||
|
||||
void Clear() override;
|
||||
|
||||
void GetIntersectingObjects( const BBOX_2D& aBBox,
|
||||
CONST_LIST_OBJECT2D& aOutList ) const override;
|
||||
void GetIntersectingObjects( const BBOX_2D& aBBox, CONST_LIST_OBJECT2D& aOutList ) const override;
|
||||
|
||||
bool IntersectAny( const RAYSEG2D& aSegRay ) const override;
|
||||
|
||||
private:
|
||||
void destroy();
|
||||
void recursiveBuild_MIDDLE_SPLIT( BVH_CONTAINER_NODE_2D* aNodeParent );
|
||||
void recursiveGetListObjectsIntersects( const BVH_CONTAINER_NODE_2D* aNode,
|
||||
const BBOX_2D& aBBox,
|
||||
void recursiveGetListObjectsIntersects( const BVH_CONTAINER_NODE_2D* aNode, const BBOX_2D& aBBox,
|
||||
CONST_LIST_OBJECT2D& aOutList ) const;
|
||||
bool recursiveIntersectAny( const BVH_CONTAINER_NODE_2D* aNode,
|
||||
const RAYSEG2D& aSegRay ) const;
|
||||
bool recursiveIntersectAny( const BVH_CONTAINER_NODE_2D* aNode, const RAYSEG2D& aSegRay ) const;
|
||||
|
||||
bool m_isInitialized;
|
||||
private:
|
||||
bool m_isInitialized;
|
||||
std::list<BVH_CONTAINER_NODE_2D*> m_elementsToDelete;
|
||||
BVH_CONTAINER_NODE_2D* m_tree;
|
||||
BVH_CONTAINER_NODE_2D* m_tree;
|
||||
|
||||
};
|
||||
|
||||
#endif // _CONTAINER_2D_H_
|
||||
|
@ -23,12 +23,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file layer_item_2d.h
|
||||
*/
|
||||
|
||||
#ifndef _LAYER_ITEM_2D_H_
|
||||
#define _LAYER_ITEM_2D_H_
|
||||
#pragma once
|
||||
|
||||
#include "object_2d.h"
|
||||
#include <vector>
|
||||
@ -84,6 +79,11 @@ public:
|
||||
|
||||
~LAYER_ITEM_2D();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
LAYER_ITEM_2D( const LAYER_ITEM_2D& ) = delete;
|
||||
LAYER_ITEM_2D& operator=( const LAYER_ITEM_2D& ) = delete;
|
||||
|
||||
// Imported from OBJECT_2D
|
||||
bool Overlaps( const BBOX_2D& aBBox ) const override;
|
||||
bool Intersects( const BBOX_2D& aBBox ) const override;
|
||||
@ -97,4 +97,3 @@ private:
|
||||
const OBJECT_2D* m_objectC;
|
||||
};
|
||||
|
||||
#endif // _LAYER_ITEM_2D_H_
|
||||
|
@ -18,8 +18,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef APPEARANCE_CONTROLS_3D_H
|
||||
#define APPEARANCE_CONTROLS_3D_H
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -113,6 +112,11 @@ public:
|
||||
APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent, wxWindow* aFocusOwner );
|
||||
~APPEARANCE_CONTROLS_3D();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
APPEARANCE_CONTROLS_3D( const APPEARANCE_CONTROLS_3D& ) = delete;
|
||||
APPEARANCE_CONTROLS_3D& operator=( const APPEARANCE_CONTROLS_3D& ) = delete;
|
||||
|
||||
wxSize GetBestSize() const;
|
||||
void OnDarkModeToggle();
|
||||
void OnLayerVisibilityChanged( int aLayer, bool isVisible );
|
||||
@ -189,5 +193,3 @@ private:
|
||||
wxCheckBox* m_cbUseBoardStackupColors;
|
||||
wxCheckBox* m_cbUseBoardEditorCopperColors;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
const LIB_ID& GetDesignBlockLibId() const { return m_designBlockLibId; }
|
||||
|
||||
protected:
|
||||
std::unordered_set<EDA_ITEM*> m_items; // Members of the group
|
||||
std::unordered_set<EDA_ITEM*> m_items; // Members of the group (no ownership)
|
||||
wxString m_name; // Optional group name
|
||||
LIB_ID m_designBlockLibId; // Optional link to a design block
|
||||
};
|
||||
|
@ -186,6 +186,11 @@ public:
|
||||
|
||||
virtual ~JOB();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
JOB( const JOB& ) = delete;
|
||||
JOB& operator=( const JOB& ) = delete;
|
||||
|
||||
const std::string& GetType() const { return m_type; };
|
||||
|
||||
const std::map<wxString, wxString>& GetVarOverrides() const { return m_varOverrides; }
|
||||
|
@ -260,8 +260,7 @@ struct APP_SINGLE_TOP : public wxApp
|
||||
if( dlgs.back() == dialog )
|
||||
dlgs.pop_back();
|
||||
// If an out-of-order, remove all dialogs added after the closed one
|
||||
else if( auto it = std::find( dlgs.begin(), dlgs.end(), dialog );
|
||||
it != dlgs.end() )
|
||||
else if( auto it = std::find( dlgs.begin(), dlgs.end(), dialog ); it != dlgs.end() )
|
||||
dlgs.erase( it, dlgs.end() );
|
||||
}
|
||||
}
|
||||
|
@ -350,8 +350,12 @@ public:
|
||||
~TEXT_BUTTON_URL()
|
||||
{
|
||||
Unbind( wxEVT_TEXT, &TEXT_BUTTON_URL::OnTextChange, this );
|
||||
|
||||
m_filesStack.clear(); // we don't own pointers
|
||||
}
|
||||
|
||||
// We don't own any of our raw pointers, so compiler's copy c'tor an operator= are OK.
|
||||
|
||||
protected:
|
||||
void DoSetPopupControl( wxComboPopup* popup ) override
|
||||
{
|
||||
@ -368,8 +372,7 @@ protected:
|
||||
{
|
||||
FILEDLG_HOOK_EMBED_FILE customize;
|
||||
|
||||
wxFileDialog openFileDialog( this, _( "Open file" ), "", "",
|
||||
_( "All Files" ) + wxT( " (*.*)|*.*" ),
|
||||
wxFileDialog openFileDialog( this, _( "Open file" ), "", "", _( "All Files" ) + wxT( " (*.*)|*.*" ),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
openFileDialog.SetCustomizeHook( customize );
|
||||
@ -414,8 +417,8 @@ protected:
|
||||
|
||||
protected:
|
||||
DIALOG_SHIM* m_dlg;
|
||||
SEARCH_STACK* m_searchStack;
|
||||
std::vector<EMBEDDED_FILES*> m_filesStack;
|
||||
SEARCH_STACK* m_searchStack; // No ownership of pointer
|
||||
std::vector<EMBEDDED_FILES*> m_filesStack; // No ownership of pointers
|
||||
};
|
||||
|
||||
|
||||
|
@ -158,7 +158,7 @@ void PROPERTIES_PANEL::OnLanguageChanged( wxCommandEvent& aEvent )
|
||||
m_grid->CommitChangesFromEditor();
|
||||
|
||||
m_grid->Clear();
|
||||
m_displayed.clear();
|
||||
m_displayed.clear(); // no ownership of pointers
|
||||
|
||||
UpdateData();
|
||||
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
int m_SuppressGridChangeEvents;
|
||||
|
||||
protected:
|
||||
std::vector<PROPERTY_BASE*> m_displayed;
|
||||
std::vector<PROPERTY_BASE*> m_displayed; // no ownership of pointers
|
||||
wxPropertyGrid* m_grid;
|
||||
EDA_BASE_FRAME* m_frame;
|
||||
wxStaticText* m_caption;
|
||||
|
@ -143,6 +143,11 @@ SEARCH_PANE::~SEARCH_PANE()
|
||||
m_frame->Unbind( EDA_LANG_CHANGED, &SEARCH_PANE::OnLanguageChange, this );
|
||||
Unbind( wxEVT_CHAR_HOOK, &SEARCH_PANE::OnCharHook, this );
|
||||
|
||||
for( SEARCH_HANDLER* handler : m_handlers )
|
||||
delete handler;
|
||||
|
||||
m_handlers.clear();
|
||||
|
||||
delete m_menu;
|
||||
}
|
||||
|
||||
|
@ -370,6 +370,11 @@ public:
|
||||
Reset();
|
||||
}
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
CONNECTION_GRAPH( const CONNECTION_GRAPH& ) = delete;
|
||||
CONNECTION_GRAPH& operator=( const CONNECTION_GRAPH& ) = delete;
|
||||
|
||||
void Reset();
|
||||
|
||||
void SetSchematic( SCHEMATIC* aSchematic )
|
||||
|
@ -19,8 +19,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _ERC_SETTINGS_H
|
||||
#define _ERC_SETTINGS_H
|
||||
#pragma once
|
||||
|
||||
#include <erc/erc_item.h>
|
||||
#include <pin_type.h>
|
||||
@ -250,6 +249,11 @@ public:
|
||||
m_severities( 0 )
|
||||
{ }
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
SHEETLIST_ERC_ITEMS_PROVIDER( const SHEETLIST_ERC_ITEMS_PROVIDER& ) = delete;
|
||||
SHEETLIST_ERC_ITEMS_PROVIDER& operator=( const SHEETLIST_ERC_ITEMS_PROVIDER& ) = delete;
|
||||
|
||||
void SetSeverities( int aSeverities ) override;
|
||||
|
||||
int GetCount( int aSeverity = -1 ) const override;
|
||||
@ -265,5 +269,3 @@ private:
|
||||
void visitMarkers( std::function<void( SCH_MARKER* )> aVisitor ) const;
|
||||
};
|
||||
|
||||
|
||||
#endif // _ERC_SETTINGS_H
|
||||
|
@ -137,11 +137,11 @@ protected:
|
||||
bool m_excludedFromBoard;
|
||||
bool m_DNP; ///< True if symbol is set to 'Do Not Populate'.
|
||||
|
||||
/// All #SCH_ITEM objects currently contained or intersecting the rule area.
|
||||
/// All #SCH_ITEM objects currently contained or intersecting the rule area. No ownership.
|
||||
std::unordered_set<SCH_ITEM*> m_items;
|
||||
std::unordered_set<KIID> m_itemIDs;
|
||||
|
||||
/// All #SCH_DIRECTIVE_LABEL objectss attached to the rule area border.
|
||||
/// All #SCH_DIRECTIVE_LABEL objects attached to the rule area border. No ownership.
|
||||
std::unordered_set<SCH_DIRECTIVE_LABEL*> m_directives;
|
||||
std::unordered_set<KIID> m_directiveIDs;
|
||||
|
||||
|
@ -22,8 +22,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef SIM_LIB_MGR_H
|
||||
#define SIM_LIB_MGR_H
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
@ -84,12 +83,10 @@ public:
|
||||
REPORTER& aReporter );
|
||||
|
||||
private:
|
||||
std::vector<EMBEDDED_FILES*> m_embeddedFilesStack;
|
||||
const PROJECT* m_project;
|
||||
std::vector<EMBEDDED_FILES*> m_embeddedFilesStack; // no ownership
|
||||
const PROJECT* m_project; // no ownership
|
||||
bool m_forceFullParse;
|
||||
std::map<wxString, std::unique_ptr<SIM_LIBRARY>> m_libraries;
|
||||
std::vector<std::unique_ptr<SIM_MODEL>> m_models;
|
||||
};
|
||||
|
||||
|
||||
#endif // SIM_LIB_MGR_H
|
||||
|
@ -18,8 +18,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LIBEVAL_COMPILER_H
|
||||
#define __LIBEVAL_COMPILER_H
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
@ -188,7 +187,7 @@ public:
|
||||
virtual double Convert( const wxString& aString, int unitType ) const
|
||||
{
|
||||
return 0.0;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -202,7 +201,7 @@ public:
|
||||
m_isDeferredDbl( false ),
|
||||
m_isDeferredStr( false ),
|
||||
m_units( EDA_UNITS::UNSCALED )
|
||||
{};
|
||||
{}
|
||||
|
||||
VALUE( const wxString& aStr, bool aIsWildcard = false ) :
|
||||
m_type( VT_STRING ),
|
||||
@ -212,7 +211,7 @@ public:
|
||||
m_isDeferredDbl( false ),
|
||||
m_isDeferredStr( false ),
|
||||
m_units( EDA_UNITS::UNSCALED )
|
||||
{};
|
||||
{}
|
||||
|
||||
VALUE( const double aVal ) :
|
||||
m_type( VT_NUMERIC ),
|
||||
@ -221,7 +220,7 @@ public:
|
||||
m_isDeferredDbl( false ),
|
||||
m_isDeferredStr( false ),
|
||||
m_units( EDA_UNITS::UNSCALED )
|
||||
{};
|
||||
{}
|
||||
|
||||
static VALUE* MakeNullValue()
|
||||
{
|
||||
@ -230,8 +229,7 @@ public:
|
||||
return v;
|
||||
}
|
||||
|
||||
virtual ~VALUE()
|
||||
{};
|
||||
virtual ~VALUE() = default;
|
||||
|
||||
virtual double AsDouble() const
|
||||
{
|
||||
@ -321,8 +319,10 @@ private:
|
||||
class KICOMMON_API VAR_REF
|
||||
{
|
||||
public:
|
||||
VAR_REF() {};
|
||||
virtual ~VAR_REF() {};
|
||||
VAR_REF()
|
||||
{}
|
||||
|
||||
virtual ~VAR_REF() = default;
|
||||
|
||||
virtual VAR_TYPE_T GetType() const = 0;
|
||||
virtual VALUE* GetValue( CONTEXT* aCtx ) = 0;
|
||||
@ -333,8 +333,8 @@ class KICOMMON_API CONTEXT
|
||||
{
|
||||
public:
|
||||
CONTEXT() :
|
||||
m_stack(),
|
||||
m_stackPtr( 0 )
|
||||
m_stack(),
|
||||
m_stackPtr( 0 )
|
||||
{
|
||||
m_ownedValues.reserve( 20 );
|
||||
}
|
||||
@ -342,11 +342,14 @@ public:
|
||||
virtual ~CONTEXT()
|
||||
{
|
||||
for( VALUE* v : m_ownedValues )
|
||||
{
|
||||
delete v;
|
||||
}
|
||||
}
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
CONTEXT( const CONTEXT& ) = delete;
|
||||
CONTEXT& operator=( const CONTEXT& ) = delete;
|
||||
|
||||
VALUE* AllocValue()
|
||||
{
|
||||
m_ownedValues.emplace_back( new VALUE );
|
||||
@ -401,8 +404,16 @@ private:
|
||||
class KICOMMON_API UCODE
|
||||
{
|
||||
public:
|
||||
UCODE()
|
||||
{}
|
||||
|
||||
virtual ~UCODE();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
UCODE( const UCODE& ) = delete;
|
||||
UCODE& operator=( const UCODE& ) = delete;
|
||||
|
||||
void AddOp( UOP* uop )
|
||||
{
|
||||
m_ucode.push_back(uop);
|
||||
@ -414,15 +425,14 @@ public:
|
||||
virtual std::unique_ptr<VAR_REF> CreateVarRef( const wxString& var, const wxString& field )
|
||||
{
|
||||
return nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
virtual FUNC_CALL_REF CreateFuncCall( const wxString& name )
|
||||
{
|
||||
return nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
std::vector<UOP*> m_ucode;
|
||||
};
|
||||
|
||||
@ -434,24 +444,22 @@ public:
|
||||
m_op( op ),
|
||||
m_ref(nullptr),
|
||||
m_value( std::move( value ) )
|
||||
{};
|
||||
{}
|
||||
|
||||
UOP( int op, std::unique_ptr<VAR_REF> vref ) :
|
||||
m_op( op ),
|
||||
m_ref( std::move( vref ) ),
|
||||
m_value(nullptr)
|
||||
{};
|
||||
{}
|
||||
|
||||
UOP( int op, FUNC_CALL_REF func, std::unique_ptr<VAR_REF> vref = nullptr ) :
|
||||
m_op( op ),
|
||||
m_func( std::move( func ) ),
|
||||
m_ref( std::move( vref ) ),
|
||||
m_value(nullptr)
|
||||
{};
|
||||
{}
|
||||
|
||||
~UOP()
|
||||
{
|
||||
}
|
||||
virtual ~UOP() = default;
|
||||
|
||||
void Exec( CONTEXT* ctx );
|
||||
|
||||
@ -522,6 +530,11 @@ public:
|
||||
COMPILER();
|
||||
virtual ~COMPILER();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
COMPILER( const COMPILER& ) = delete;
|
||||
COMPILER& operator=( const COMPILER& ) = delete;
|
||||
|
||||
/*
|
||||
* clear() should be invoked by the client if a new input string is to be processed. It
|
||||
* will reset the parser. User defined variables are retained.
|
||||
@ -596,4 +609,3 @@ protected:
|
||||
|
||||
} // namespace LIBEVAL
|
||||
|
||||
#endif /* LIBEVAL_COMPILER_H_ */
|
||||
|
@ -219,6 +219,11 @@ public:
|
||||
delete child;
|
||||
}
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
RC_TREE_NODE( const RC_TREE_NODE& ) = delete;
|
||||
RC_TREE_NODE& operator=( const RC_TREE_NODE& ) = delete;
|
||||
|
||||
NODE_TYPE m_Type;
|
||||
std::shared_ptr<RC_ITEM> m_RcItem;
|
||||
|
||||
@ -248,6 +253,11 @@ public:
|
||||
|
||||
~RC_TREE_MODEL();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
RC_TREE_MODEL( const RC_TREE_MODEL& ) = delete;
|
||||
RC_TREE_MODEL& operator=( const RC_TREE_MODEL& ) = delete;
|
||||
|
||||
void Update( std::shared_ptr<RC_ITEMS_PROVIDER> aProvider, int aSeverities );
|
||||
|
||||
void ExpandAll();
|
||||
|
@ -78,6 +78,11 @@ public:
|
||||
|
||||
virtual ~JSON_SETTINGS();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
JSON_SETTINGS( const JSON_SETTINGS& ) = delete;
|
||||
JSON_SETTINGS& operator=( const JSON_SETTINGS& ) = delete;
|
||||
|
||||
wxString GetFilename() const { return m_filename; }
|
||||
|
||||
wxString GetFullFilename() const;
|
||||
|
@ -103,7 +103,7 @@ protected:
|
||||
///< The default action to display on the toolbar item
|
||||
const TOOL_ACTION* m_defaultAction;
|
||||
|
||||
///< The actions that compose the group
|
||||
///< The actions that compose the group. Non-owning.
|
||||
std::vector<const TOOL_ACTION*> m_actions;
|
||||
};
|
||||
|
||||
|
@ -292,6 +292,11 @@ public:
|
||||
UNDO_REDO_CONTAINER();
|
||||
~UNDO_REDO_CONTAINER();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
UNDO_REDO_CONTAINER( const UNDO_REDO_CONTAINER& ) = delete;
|
||||
UNDO_REDO_CONTAINER& operator=( const UNDO_REDO_CONTAINER& ) = delete;
|
||||
|
||||
void PushCommand( PICKED_ITEMS_LIST* aCommand );
|
||||
|
||||
PICKED_ITEMS_LIST* PopCommand();
|
||||
|
@ -24,8 +24,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __VIEW_H
|
||||
#define __VIEW_H
|
||||
#pragma once
|
||||
|
||||
#include <gal/gal.h>
|
||||
#include <vector>
|
||||
@ -73,6 +72,11 @@ public:
|
||||
VIEW();
|
||||
virtual ~VIEW();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
VIEW( const VIEW& ) = delete;
|
||||
VIEW& operator=( const VIEW& ) = delete;
|
||||
|
||||
/**
|
||||
* Nasty hack, invoked by the destructor of VIEW_ITEM to auto-remove the item
|
||||
* from the owning VIEW if there is any.
|
||||
@ -768,10 +772,6 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
VIEW( const VIEW& ) = delete;
|
||||
|
||||
/// Redraw contents within rectangle \a aRect.
|
||||
void redrawRect( const BOX2I& aRect );
|
||||
|
||||
@ -856,7 +856,7 @@ protected:
|
||||
struct UPDATE_DEPTH_VISITOR;
|
||||
|
||||
std::unique_ptr<KIGFX::VIEW_GROUP> m_preview;
|
||||
std::vector<VIEW_ITEM *> m_ownedItems;
|
||||
std::vector<VIEW_ITEM*> m_ownedItems;
|
||||
|
||||
/// Whether to use rendering order modifier or not.
|
||||
bool m_enableOrderModifier;
|
||||
@ -904,4 +904,3 @@ protected:
|
||||
};
|
||||
} // namespace KIGFX
|
||||
|
||||
#endif
|
||||
|
@ -25,12 +25,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file view_group.h
|
||||
*/
|
||||
|
||||
#ifndef VIEW_GROUP_H_
|
||||
#define VIEW_GROUP_H_
|
||||
#pragma once
|
||||
|
||||
#include <gal/gal.h>
|
||||
#include <view/view_item.h>
|
||||
@ -50,6 +45,11 @@ public:
|
||||
VIEW_GROUP( VIEW* aView = nullptr );
|
||||
virtual ~VIEW_GROUP();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
VIEW_GROUP( const VIEW_GROUP& ) = delete;
|
||||
VIEW_GROUP& operator=( const VIEW_GROUP& ) = delete;
|
||||
|
||||
wxString GetClass() const override;
|
||||
|
||||
/**
|
||||
@ -108,9 +108,7 @@ protected:
|
||||
|
||||
protected:
|
||||
int m_layer;
|
||||
std::vector<VIEW_ITEM*> m_groupItems;
|
||||
std::vector<VIEW_ITEM*> m_groupItems; // No ownership.
|
||||
};
|
||||
|
||||
} // namespace KIGFX
|
||||
|
||||
#endif // VIEW_GROUP_H_
|
||||
|
@ -24,12 +24,10 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __VIEW_OVERLAY_H
|
||||
#define __VIEW_OVERLAY_H
|
||||
#pragma once
|
||||
|
||||
#include <gal/gal.h>
|
||||
#include <view/view_item.h>
|
||||
|
||||
#include <vector>
|
||||
#include <deque>
|
||||
|
||||
@ -48,6 +46,11 @@ public:
|
||||
VIEW_OVERLAY();
|
||||
virtual ~VIEW_OVERLAY();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
VIEW_OVERLAY( const VIEW_OVERLAY& ) = delete;
|
||||
VIEW_OVERLAY& operator=( const VIEW_OVERLAY& ) = delete;
|
||||
|
||||
wxString GetClass() const override;
|
||||
|
||||
struct COMMAND;
|
||||
@ -109,13 +112,11 @@ public:
|
||||
private:
|
||||
void releaseCommands();
|
||||
|
||||
COLOR4D m_strokeColor;
|
||||
COLOR4D m_fillColor;
|
||||
|
||||
private:
|
||||
COLOR4D m_strokeColor;
|
||||
COLOR4D m_fillColor;
|
||||
std::vector<COMMAND*> m_commands;
|
||||
};
|
||||
|
||||
} // namespace KIGFX
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -135,8 +135,8 @@ public:
|
||||
|
||||
protected:
|
||||
DIALOG_SHIM* m_dlg;
|
||||
SEARCH_STACK* m_searchStack;
|
||||
std::vector<EMBEDDED_FILES*> m_filesStack;
|
||||
SEARCH_STACK* m_searchStack; // No ownership.
|
||||
std::vector<EMBEDDED_FILES*> m_filesStack; // No ownership.
|
||||
};
|
||||
|
||||
|
||||
|
@ -68,6 +68,11 @@ public:
|
||||
SEARCH_PANE( EDA_DRAW_FRAME* aFrame );
|
||||
virtual ~SEARCH_PANE();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
SEARCH_PANE( const SEARCH_PANE& ) = delete;
|
||||
SEARCH_PANE& operator=( const SEARCH_PANE& ) = delete;
|
||||
|
||||
void AddSearcher( SEARCH_HANDLER* aHandler );
|
||||
void OnSearchTextEntry( wxCommandEvent& aEvent ) override;
|
||||
void OnNotebookPageChanged( wxBookCtrlEvent& aEvent ) override;
|
||||
@ -84,8 +89,8 @@ protected:
|
||||
void OnClosed( wxAuiManagerEvent& aEvent );
|
||||
|
||||
private:
|
||||
std::vector<SEARCH_HANDLER*> m_handlers;
|
||||
std::vector<SEARCH_PANE_TAB*> m_tabs;
|
||||
std::vector<SEARCH_HANDLER*> m_handlers; // We own these.
|
||||
std::vector<SEARCH_PANE_TAB*> m_tabs; // No ownership.
|
||||
wxString m_lastQuery;
|
||||
EDA_DRAW_FRAME* m_frame;
|
||||
ACTION_MENU* m_menu;
|
||||
|
@ -91,6 +91,11 @@ public:
|
||||
DRC_ENGINE( BOARD* aBoard = nullptr, BOARD_DESIGN_SETTINGS* aSettings = nullptr );
|
||||
virtual ~DRC_ENGINE();
|
||||
|
||||
// We own several lists of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
DRC_ENGINE( const DRC_ENGINE& ) = delete;
|
||||
DRC_ENGINE& operator=( const DRC_ENGINE& ) = delete;
|
||||
|
||||
void SetBoard( BOARD* aBoard ) { m_board = aBoard; }
|
||||
BOARD* GetBoard() const { return m_board; }
|
||||
|
||||
|
@ -278,6 +278,11 @@ public:
|
||||
m_markerTypes.push_back( otherMarkerType );
|
||||
}
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
DRC_ITEMS_PROVIDER( const DRC_ITEMS_PROVIDER& ) = delete;
|
||||
DRC_ITEMS_PROVIDER& operator=( const DRC_ITEMS_PROVIDER& ) = delete;
|
||||
|
||||
void SetSeverities( int aSeverities ) override;
|
||||
|
||||
int GetCount( int aSeverity = -1 ) const override;
|
||||
|
@ -39,6 +39,9 @@ public:
|
||||
|
||||
~PCB_TABLE();
|
||||
|
||||
// If implemented, would need to copy m_cells list.
|
||||
PCB_TABLE& operator=( const PCB_TABLE& ) = delete;
|
||||
|
||||
static inline bool ClassOf( const EDA_ITEM* aItem )
|
||||
{
|
||||
return aItem && PCB_TABLE_T == aItem->Type();
|
||||
|
@ -202,6 +202,11 @@ public:
|
||||
APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFocusOwner, bool aFpEditor = false );
|
||||
~APPEARANCE_CONTROLS();
|
||||
|
||||
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
|
||||
// will only land us in trouble.
|
||||
APPEARANCE_CONTROLS( const APPEARANCE_CONTROLS& ) = delete;
|
||||
APPEARANCE_CONTROLS& operator=( const APPEARANCE_CONTROLS& ) = delete;
|
||||
|
||||
wxSize GetBestSize() const;
|
||||
|
||||
///< Update the panel contents from the application and board models.
|
||||
|
Loading…
x
Reference in New Issue
Block a user