Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
b6c43e90
Commit
b6c43e90
authored
Aug 16, 2014
by
Aaron Burghardt
Committed by
Nikias Bassen
Sep 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added const to Array.GetSize(), and to 3 Node methods.
parent
ccd6f05f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
Array.h
include/plist/Array.h
+1
-1
Structure.h
include/plist/Structure.h
+3
-3
Array.cpp
src/Array.cpp
+2
-2
Structure.cpp
src/Structure.cpp
+3
-3
No files found.
include/plist/Array.h
View file @
b6c43e90
...
...
@@ -44,7 +44,7 @@ public :
void
Insert
(
Node
*
node
,
unsigned
int
pos
);
void
Remove
(
Node
*
node
);
void
Remove
(
unsigned
int
pos
);
unsigned
int
GetNodeIndex
(
Node
*
node
);
unsigned
int
GetNodeIndex
(
Node
*
node
)
const
;
private
:
std
::
vector
<
Node
*>
_array
;
...
...
include/plist/Structure.h
View file @
b6c43e90
...
...
@@ -34,10 +34,10 @@ class Structure : public Node
public
:
virtual
~
Structure
();
uint32_t
GetSize
();
uint32_t
GetSize
()
const
;
std
::
string
ToXml
();
std
::
vector
<
char
>
ToBin
();
std
::
string
ToXml
()
const
;
std
::
vector
<
char
>
ToBin
()
const
;
virtual
void
Remove
(
Node
*
node
)
=
0
;
...
...
src/Array.cpp
View file @
b6c43e90
...
...
@@ -141,9 +141,9 @@ void Array::Remove(unsigned int pos)
_array
.
erase
(
it
);
}
unsigned
int
Array
::
GetNodeIndex
(
Node
*
node
)
unsigned
int
Array
::
GetNodeIndex
(
Node
*
node
)
const
{
std
::
vector
<
Node
*>::
iterator
it
=
std
::
find
(
_array
.
begin
(),
_array
.
end
(),
node
);
std
::
vector
<
Node
*>::
const_
iterator
it
=
std
::
find
(
_array
.
begin
(),
_array
.
end
(),
node
);
return
std
::
distance
(
_array
.
begin
(),
it
);
}
...
...
src/Structure.cpp
View file @
b6c43e90
...
...
@@ -35,7 +35,7 @@ Structure::~Structure()
{
}
uint32_t
Structure
::
GetSize
()
uint32_t
Structure
::
GetSize
()
const
{
uint32_t
size
=
0
;
plist_type
type
=
plist_get_node_type
(
_node
);
...
...
@@ -50,7 +50,7 @@ uint32_t Structure::GetSize()
return
size
;
}
std
::
string
Structure
::
ToXml
()
std
::
string
Structure
::
ToXml
()
const
{
char
*
xml
=
NULL
;
uint32_t
length
=
0
;
...
...
@@ -60,7 +60,7 @@ std::string Structure::ToXml()
return
ret
;
}
std
::
vector
<
char
>
Structure
::
ToBin
()
std
::
vector
<
char
>
Structure
::
ToBin
()
const
{
char
*
bin
=
NULL
;
uint32_t
length
=
0
;
...
...
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