Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
32065b33
Commit
32065b33
authored
Dec 18, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added const modifiers where applicable (PICKED_ITEMS_LIST).
Added PICKED_ITEMS_LIST::FindItem().
parent
4a0407fb
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
45 additions
and
26 deletions
+45
-26
class_undoredo_container.cpp
common/class_undoredo_container.cpp
+19
-7
class_DisplayFootprintsFrame.h
cvpcb/class_DisplayFootprintsFrame.h
+1
-1
schematic_undo_redo.cpp
eeschema/schematic_undo_redo.cpp
+1
-1
gerbview_frame.h
gerbview/gerbview_frame.h
+1
-1
class_undoredo_container.h
include/class_undoredo_container.h
+15
-8
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+1
-1
wxEeschemaStruct.h
include/wxEeschemaStruct.h
+1
-1
wxPcbStruct.h
include/wxPcbStruct.h
+1
-1
board_undo_redo.cpp
pcbnew/board_undo_redo.cpp
+1
-1
footprint_wizard_frame.h
pcbnew/footprint_wizard_frame.h
+1
-1
modedit_undo_redo.cpp
pcbnew/modedit_undo_redo.cpp
+1
-1
module_editor_frame.h
pcbnew/module_editor_frame.h
+1
-1
modview_frame.h
pcbnew/modview_frame.h
+1
-1
No files found.
common/class_undoredo_container.cpp
View file @
32065b33
...
@@ -50,7 +50,7 @@ PICKED_ITEMS_LIST::~PICKED_ITEMS_LIST()
...
@@ -50,7 +50,7 @@ PICKED_ITEMS_LIST::~PICKED_ITEMS_LIST()
}
}
void
PICKED_ITEMS_LIST
::
PushItem
(
ITEM_PICKER
&
aItem
)
void
PICKED_ITEMS_LIST
::
PushItem
(
const
ITEM_PICKER
&
aItem
)
{
{
m_ItemsList
.
push_back
(
aItem
);
m_ItemsList
.
push_back
(
aItem
);
}
}
...
@@ -70,7 +70,7 @@ ITEM_PICKER PICKED_ITEMS_LIST::PopItem()
...
@@ -70,7 +70,7 @@ ITEM_PICKER PICKED_ITEMS_LIST::PopItem()
}
}
bool
PICKED_ITEMS_LIST
::
ContainsItem
(
EDA_ITEM
*
aItem
)
const
bool
PICKED_ITEMS_LIST
::
ContainsItem
(
const
EDA_ITEM
*
aItem
)
const
{
{
for
(
size_t
i
=
0
;
i
<
m_ItemsList
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
m_ItemsList
.
size
();
i
++
)
{
{
...
@@ -82,6 +82,18 @@ bool PICKED_ITEMS_LIST::ContainsItem( EDA_ITEM* aItem ) const
...
@@ -82,6 +82,18 @@ bool PICKED_ITEMS_LIST::ContainsItem( EDA_ITEM* aItem ) const
}
}
int
PICKED_ITEMS_LIST
::
FindItem
(
const
EDA_ITEM
*
aItem
)
const
{
for
(
size_t
i
=
0
;
i
<
m_ItemsList
.
size
();
i
++
)
{
if
(
m_ItemsList
[
i
].
GetItem
()
==
aItem
)
return
i
;
}
return
-
1
;
}
void
PICKED_ITEMS_LIST
::
ClearItemsList
()
void
PICKED_ITEMS_LIST
::
ClearItemsList
()
{
{
m_ItemsList
.
clear
();
m_ItemsList
.
clear
();
...
@@ -157,7 +169,7 @@ void PICKED_ITEMS_LIST::ClearListAndDeleteItems()
...
@@ -157,7 +169,7 @@ void PICKED_ITEMS_LIST::ClearListAndDeleteItems()
}
}
ITEM_PICKER
PICKED_ITEMS_LIST
::
GetItemWrapper
(
unsigned
int
aIdx
)
ITEM_PICKER
PICKED_ITEMS_LIST
::
GetItemWrapper
(
unsigned
int
aIdx
)
const
{
{
ITEM_PICKER
picker
;
ITEM_PICKER
picker
;
...
@@ -168,7 +180,7 @@ ITEM_PICKER PICKED_ITEMS_LIST::GetItemWrapper( unsigned int aIdx )
...
@@ -168,7 +180,7 @@ ITEM_PICKER PICKED_ITEMS_LIST::GetItemWrapper( unsigned int aIdx )
}
}
EDA_ITEM
*
PICKED_ITEMS_LIST
::
GetPickedItem
(
unsigned
int
aIdx
)
EDA_ITEM
*
PICKED_ITEMS_LIST
::
GetPickedItem
(
unsigned
int
aIdx
)
const
{
{
if
(
aIdx
<
m_ItemsList
.
size
()
)
if
(
aIdx
<
m_ItemsList
.
size
()
)
return
m_ItemsList
[
aIdx
].
GetItem
();
return
m_ItemsList
[
aIdx
].
GetItem
();
...
@@ -177,7 +189,7 @@ EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItem( unsigned int aIdx )
...
@@ -177,7 +189,7 @@ EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItem( unsigned int aIdx )
}
}
EDA_ITEM
*
PICKED_ITEMS_LIST
::
GetPickedItemLink
(
unsigned
int
aIdx
)
EDA_ITEM
*
PICKED_ITEMS_LIST
::
GetPickedItemLink
(
unsigned
int
aIdx
)
const
{
{
if
(
aIdx
<
m_ItemsList
.
size
()
)
if
(
aIdx
<
m_ItemsList
.
size
()
)
return
m_ItemsList
[
aIdx
].
GetLink
();
return
m_ItemsList
[
aIdx
].
GetLink
();
...
@@ -186,7 +198,7 @@ EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItemLink( unsigned int aIdx )
...
@@ -186,7 +198,7 @@ EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItemLink( unsigned int aIdx )
}
}
UNDO_REDO_T
PICKED_ITEMS_LIST
::
GetPickedItemStatus
(
unsigned
int
aIdx
)
UNDO_REDO_T
PICKED_ITEMS_LIST
::
GetPickedItemStatus
(
unsigned
int
aIdx
)
const
{
{
if
(
aIdx
<
m_ItemsList
.
size
()
)
if
(
aIdx
<
m_ItemsList
.
size
()
)
return
m_ItemsList
[
aIdx
].
GetStatus
();
return
m_ItemsList
[
aIdx
].
GetStatus
();
...
@@ -195,7 +207,7 @@ UNDO_REDO_T PICKED_ITEMS_LIST::GetPickedItemStatus( unsigned int aIdx )
...
@@ -195,7 +207,7 @@ UNDO_REDO_T PICKED_ITEMS_LIST::GetPickedItemStatus( unsigned int aIdx )
}
}
STATUS_FLAGS
PICKED_ITEMS_LIST
::
GetPickerFlags
(
unsigned
aIdx
)
STATUS_FLAGS
PICKED_ITEMS_LIST
::
GetPickerFlags
(
unsigned
aIdx
)
const
{
{
if
(
aIdx
<
m_ItemsList
.
size
()
)
if
(
aIdx
<
m_ItemsList
.
size
()
)
return
m_ItemsList
[
aIdx
].
GetFlags
();
return
m_ItemsList
[
aIdx
].
GetFlags
();
...
...
cvpcb/class_DisplayFootprintsFrame.h
View file @
32065b33
...
@@ -124,7 +124,7 @@ public:
...
@@ -124,7 +124,7 @@ public:
* @param aTransformPoint = the reference point of the transformation,
* @param aTransformPoint = the reference point of the transformation,
* for commands like move
* for commands like move
*/
*/
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
virtual
void
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
aItemsList
,
UNDO_REDO_T
aTypeCommand
,
UNDO_REDO_T
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
{
{
...
...
eeschema/schematic_undo_redo.cpp
View file @
32065b33
...
@@ -160,7 +160,7 @@ void SCH_EDIT_FRAME::SaveCopyInUndoList( SCH_ITEM* aItem,
...
@@ -160,7 +160,7 @@ void SCH_EDIT_FRAME::SaveCopyInUndoList( SCH_ITEM* aItem,
}
}
void
SCH_EDIT_FRAME
::
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
void
SCH_EDIT_FRAME
::
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
aItemsList
,
UNDO_REDO_T
aTypeCommand
,
UNDO_REDO_T
aTypeCommand
,
const
wxPoint
&
aTransformPoint
)
const
wxPoint
&
aTransformPoint
)
{
{
...
...
gerbview/gerbview_frame.h
View file @
32065b33
...
@@ -676,7 +676,7 @@ public:
...
@@ -676,7 +676,7 @@ public:
* @param aTransformPoint = the reference point of the transformation,
* @param aTransformPoint = the reference point of the transformation,
* for commands like move
* for commands like move
*/
*/
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
void
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
aItemsList
,
UNDO_REDO_T
aTypeCommand
,
UNDO_REDO_T
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
{
{
...
...
include/class_undoredo_container.h
View file @
32065b33
...
@@ -111,7 +111,7 @@ public:
...
@@ -111,7 +111,7 @@ public:
void
SetStatus
(
UNDO_REDO_T
aStatus
)
{
m_undoRedoStatus
=
aStatus
;
}
void
SetStatus
(
UNDO_REDO_T
aStatus
)
{
m_undoRedoStatus
=
aStatus
;
}
UNDO_REDO_T
GetStatus
()
{
return
m_undoRedoStatus
;
}
UNDO_REDO_T
GetStatus
()
const
{
return
m_undoRedoStatus
;
}
void
SetFlags
(
STATUS_FLAGS
aFlags
)
{
m_pickerFlags
=
aFlags
;
}
void
SetFlags
(
STATUS_FLAGS
aFlags
)
{
m_pickerFlags
=
aFlags
;
}
...
@@ -148,7 +148,7 @@ public:
...
@@ -148,7 +148,7 @@ public:
* pushes \a aItem to the top of the list
* pushes \a aItem to the top of the list
* @param aItem Picker to push on to the list.
* @param aItem Picker to push on to the list.
*/
*/
void
PushItem
(
ITEM_PICKER
&
aItem
);
void
PushItem
(
const
ITEM_PICKER
&
aItem
);
/**
/**
* Function PopItem
* Function PopItem
...
@@ -160,7 +160,14 @@ public:
...
@@ -160,7 +160,14 @@ public:
* Function IsItemInList
* Function IsItemInList
* @return True if \a aItem is found in the pick list.
* @return True if \a aItem is found in the pick list.
*/
*/
bool
ContainsItem
(
EDA_ITEM
*
aItem
)
const
;
bool
ContainsItem
(
const
EDA_ITEM
*
aItem
)
const
;
/**
* Function FindItem
* @return Index of the searched item. If the item is not stored in the list, negative value
* is returned.
*/
int
FindItem
(
const
EDA_ITEM
*
aItem
)
const
;
/**
/**
* Function ClearItemsList
* Function ClearItemsList
...
@@ -201,21 +208,21 @@ public:
...
@@ -201,21 +208,21 @@ public:
* if this picker does not exist, a picker is returned,
* if this picker does not exist, a picker is returned,
* with its members set to 0 or NULL
* with its members set to 0 or NULL
*/
*/
ITEM_PICKER
GetItemWrapper
(
unsigned
int
aIdx
);
ITEM_PICKER
GetItemWrapper
(
unsigned
int
aIdx
)
const
;
/**
/**
* Function GetPickedItem
* Function GetPickedItem
* @return A pointer to the picked item
* @return A pointer to the picked item
* @param aIdx Index of the picked item in the picked list
* @param aIdx Index of the picked item in the picked list
*/
*/
EDA_ITEM
*
GetPickedItem
(
unsigned
int
aIdx
);
EDA_ITEM
*
GetPickedItem
(
unsigned
int
aIdx
)
const
;
/**
/**
* Function GetPickedItemLink
* Function GetPickedItemLink
* @return link of the picked item, or null if does not exist
* @return link of the picked item, or null if does not exist
* @param aIdx Index of the picked item in the picked list
* @param aIdx Index of the picked item in the picked list
*/
*/
EDA_ITEM
*
GetPickedItemLink
(
unsigned
int
aIdx
);
EDA_ITEM
*
GetPickedItemLink
(
unsigned
int
aIdx
)
const
;
/**
/**
* Function GetPickedItemStatus
* Function GetPickedItemStatus
...
@@ -223,7 +230,7 @@ public:
...
@@ -223,7 +230,7 @@ public:
* or UR_UNSPECIFIED if does not exist
* or UR_UNSPECIFIED if does not exist
* @param aIdx Index of the picked item in the picked list
* @param aIdx Index of the picked item in the picked list
*/
*/
UNDO_REDO_T
GetPickedItemStatus
(
unsigned
int
aIdx
);
UNDO_REDO_T
GetPickedItemStatus
(
unsigned
int
aIdx
)
const
;
/**
/**
* Function GetPickerFlags
* Function GetPickerFlags
...
@@ -231,7 +238,7 @@ public:
...
@@ -231,7 +238,7 @@ public:
* @param aIdx Index of the picker in the picked list
* @param aIdx Index of the picker in the picked list
* @return The value stored in the picker, if the picker exists, or 0 if does not exist
* @return The value stored in the picker, if the picker exists, or 0 if does not exist
*/
*/
STATUS_FLAGS
GetPickerFlags
(
unsigned
aIdx
);
STATUS_FLAGS
GetPickerFlags
(
unsigned
aIdx
)
const
;
/**
/**
* Function SetPickedItem
* Function SetPickedItem
...
...
include/wxBasePcbFrame.h
View file @
32065b33
...
@@ -669,7 +669,7 @@ public:
...
@@ -669,7 +669,7 @@ public:
* @param aTransformPoint = the reference point of the transformation,
* @param aTransformPoint = the reference point of the transformation,
* for commands like move
* for commands like move
*/
*/
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
virtual
void
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
aItemsList
,
UNDO_REDO_T
aTypeCommand
,
UNDO_REDO_T
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
=
0
;
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
=
0
;
...
...
include/wxEeschemaStruct.h
View file @
32065b33
...
@@ -1080,7 +1080,7 @@ public:
...
@@ -1080,7 +1080,7 @@ public:
* @param aTransformPoint = the reference point of the transformation,
* @param aTransformPoint = the reference point of the transformation,
* for commands like move
* for commands like move
*/
*/
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
void
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
aItemsList
,
UNDO_REDO_T
aTypeCommand
,
UNDO_REDO_T
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
...
...
include/wxPcbStruct.h
View file @
32065b33
...
@@ -659,7 +659,7 @@ public:
...
@@ -659,7 +659,7 @@ public:
* @param aTransformPoint = the reference point of the transformation, for
* @param aTransformPoint = the reference point of the transformation, for
* commands like move
* commands like move
*/
*/
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
virtual
void
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
aItemsList
,
UNDO_REDO_T
aTypeCommand
,
UNDO_REDO_T
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
...
...
pcbnew/board_undo_redo.cpp
View file @
32065b33
...
@@ -346,7 +346,7 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
...
@@ -346,7 +346,7 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
}
}
void
PCB_EDIT_FRAME
::
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
void
PCB_EDIT_FRAME
::
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
aItemsList
,
UNDO_REDO_T
aTypeCommand
,
UNDO_REDO_T
aTypeCommand
,
const
wxPoint
&
aTransformPoint
)
const
wxPoint
&
aTransformPoint
)
{
{
...
...
pcbnew/footprint_wizard_frame.h
View file @
32065b33
...
@@ -198,7 +198,7 @@ private:
...
@@ -198,7 +198,7 @@ private:
*/
*/
void
OnLeftDClick
(
wxDC
*
,
const
wxPoint
&
)
{}
void
OnLeftDClick
(
wxDC
*
,
const
wxPoint
&
)
{}
void
SaveCopyInUndoList
(
BOARD_ITEM
*
,
UNDO_REDO_T
,
const
wxPoint
&
)
{}
void
SaveCopyInUndoList
(
BOARD_ITEM
*
,
UNDO_REDO_T
,
const
wxPoint
&
)
{}
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
,
UNDO_REDO_T
,
const
wxPoint
&
)
{}
void
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
,
UNDO_REDO_T
,
const
wxPoint
&
)
{}
DECLARE_EVENT_TABLE
()
DECLARE_EVENT_TABLE
()
...
...
pcbnew/modedit_undo_redo.cpp
View file @
32065b33
...
@@ -46,7 +46,7 @@ void FOOTPRINT_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
...
@@ -46,7 +46,7 @@ void FOOTPRINT_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
}
}
void
FOOTPRINT_EDIT_FRAME
::
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
void
FOOTPRINT_EDIT_FRAME
::
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
aItemsList
,
UNDO_REDO_T
aTypeCommand
,
UNDO_REDO_T
aTypeCommand
,
const
wxPoint
&
aTransformPoint
)
const
wxPoint
&
aTransformPoint
)
{
{
...
...
pcbnew/module_editor_frame.h
View file @
32065b33
...
@@ -245,7 +245,7 @@ public:
...
@@ -245,7 +245,7 @@ public:
* @param aTransformPoint = the reference point of the transformation, for
* @param aTransformPoint = the reference point of the transformation, for
* commands like move
* commands like move
*/
*/
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
virtual
void
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
aItemsList
,
UNDO_REDO_T
aTypeCommand
,
UNDO_REDO_T
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
...
...
pcbnew/modview_frame.h
View file @
32065b33
...
@@ -202,7 +202,7 @@ private:
...
@@ -202,7 +202,7 @@ private:
*/
*/
void
OnLeftDClick
(
wxDC
*
,
const
wxPoint
&
)
{}
void
OnLeftDClick
(
wxDC
*
,
const
wxPoint
&
)
{}
void
SaveCopyInUndoList
(
BOARD_ITEM
*
,
UNDO_REDO_T
,
const
wxPoint
&
)
{}
void
SaveCopyInUndoList
(
BOARD_ITEM
*
,
UNDO_REDO_T
,
const
wxPoint
&
)
{}
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
,
UNDO_REDO_T
,
const
wxPoint
&
)
{}
void
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
,
UNDO_REDO_T
,
const
wxPoint
&
)
{}
DECLARE_EVENT_TABLE
()
DECLARE_EVENT_TABLE
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment