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
c4215848
Commit
c4215848
authored
Nov 24, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refinements
parent
6ae1471e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
dlist.cpp
common/dlist.cpp
+4
-4
dlist.h
include/dlist.h
+16
-14
No files found.
common/dlist.cpp
View file @
c4215848
...
@@ -56,7 +56,7 @@ void DHEAD::DestructAll()
...
@@ -56,7 +56,7 @@ void DHEAD::DestructAll()
}
}
void
DHEAD
::
A
ppend
(
EDA_BaseStruct
*
aNewElement
)
void
DHEAD
::
a
ppend
(
EDA_BaseStruct
*
aNewElement
)
{
{
wxASSERT
(
aNewElement
!=
NULL
);
wxASSERT
(
aNewElement
!=
NULL
);
...
@@ -85,12 +85,12 @@ void DHEAD::Append( EDA_BaseStruct* aNewElement )
...
@@ -85,12 +85,12 @@ void DHEAD::Append( EDA_BaseStruct* aNewElement )
}
}
void
DHEAD
::
I
nsert
(
EDA_BaseStruct
*
aNewElement
,
EDA_BaseStruct
*
aAfterMe
)
void
DHEAD
::
i
nsert
(
EDA_BaseStruct
*
aNewElement
,
EDA_BaseStruct
*
aAfterMe
)
{
{
wxASSERT
(
aNewElement
!=
NULL
);
wxASSERT
(
aNewElement
!=
NULL
);
if
(
!
aAfterMe
)
if
(
!
aAfterMe
)
A
ppend
(
aNewElement
);
a
ppend
(
aNewElement
);
else
else
{
{
wxASSERT
(
aAfterMe
->
GetList
()
==
this
);
wxASSERT
(
aAfterMe
->
GetList
()
==
this
);
...
@@ -126,7 +126,7 @@ void DHEAD::Insert( EDA_BaseStruct* aNewElement, EDA_BaseStruct* aAfterMe )
...
@@ -126,7 +126,7 @@ void DHEAD::Insert( EDA_BaseStruct* aNewElement, EDA_BaseStruct* aAfterMe )
}
}
void
DHEAD
::
R
emove
(
EDA_BaseStruct
*
aElement
)
void
DHEAD
::
r
emove
(
EDA_BaseStruct
*
aElement
)
{
{
wxASSERT
(
aElement
);
wxASSERT
(
aElement
);
wxASSERT
(
aElement
->
GetList
()
==
this
);
wxASSERT
(
aElement
->
GetList
()
==
this
);
...
...
include/dlist.h
View file @
c4215848
...
@@ -58,32 +58,32 @@ protected:
...
@@ -58,32 +58,32 @@ protected:
~
DHEAD
();
~
DHEAD
();
/**
/**
* Function
A
ppend
* Function
a
ppend
* adds \a aNewElement to the end of the list.
* adds \a aNewElement to the end of the list.
*/
*/
void
A
ppend
(
EDA_BaseStruct
*
aNewElement
);
void
a
ppend
(
EDA_BaseStruct
*
aNewElement
);
/**
/**
* Function
I
nsert
* Function
i
nsert
* puts aNewElement just in front of aElementAfterMe in the list sequence.
* puts aNewElement just in front of aElementAfterMe in the list sequence.
* If aElementAfterMe is NULL, then simply Append()
* If aElementAfterMe is NULL, then simply Append()
*/
*/
void
I
nsert
(
EDA_BaseStruct
*
aNewElement
,
EDA_BaseStruct
*
aElementAfterMe
);
void
i
nsert
(
EDA_BaseStruct
*
aNewElement
,
EDA_BaseStruct
*
aElementAfterMe
);
/**
/**
* Function
I
nsert
* Function
i
nsert
* puts aNewElement in front of list sequence.
* puts aNewElement in front of list sequence.
*/
*/
void
I
nsert
(
EDA_BaseStruct
*
aNewElement
)
void
i
nsert
(
EDA_BaseStruct
*
aNewElement
)
{
{
I
nsert
(
aNewElement
,
first
);
i
nsert
(
aNewElement
,
first
);
}
}
/**
/**
* Function
R
emove
* Function
r
emove
* removes \a aElement from the list, but does not delete it.
* removes \a aElement from the list, but does not delete it.
*/
*/
void
R
emove
(
EDA_BaseStruct
*
aElement
);
void
r
emove
(
EDA_BaseStruct
*
aElement
);
public
:
public
:
...
@@ -147,7 +147,7 @@ public:
...
@@ -147,7 +147,7 @@ public:
*/
*/
void
Append
(
T
*
aNewElement
)
void
Append
(
T
*
aNewElement
)
{
{
DHEAD
::
A
ppend
(
aNewElement
);
a
ppend
(
aNewElement
);
}
}
/**
/**
...
@@ -157,7 +157,7 @@ public:
...
@@ -157,7 +157,7 @@ public:
*/
*/
void
Insert
(
T
*
aNewElement
,
T
*
aElementAfterMe
)
void
Insert
(
T
*
aNewElement
,
T
*
aElementAfterMe
)
{
{
DHEAD
::
I
nsert
(
aNewElement
,
aElementAfterMe
);
i
nsert
(
aNewElement
,
aElementAfterMe
);
}
}
/**
/**
...
@@ -166,16 +166,18 @@ public:
...
@@ -166,16 +166,18 @@ public:
*/
*/
void
Insert
(
T
*
aNewElement
)
void
Insert
(
T
*
aNewElement
)
{
{
DHEAD
::
I
nsert
(
aNewElement
);
i
nsert
(
aNewElement
);
}
}
/**
/**
* Function Remove
* Function Remove
* removes \a aElement from the list, but does not delete it.
* removes \a aElement from the list, but does not delete it.
* @return T* - the removed element, so you can easily delete it upon return.
*/
*/
void
Remove
(
T
*
aElement
)
T
*
Remove
(
T
*
aElement
)
{
{
DHEAD
::
Remove
(
aElement
);
remove
(
aElement
);
return
aElement
;
}
}
};
};
...
...
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