Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
钟尚武
dlib
Commits
ae299a76
Commit
ae299a76
authored
Jan 26, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gave circular_buffer a constructor that takes the size.
parent
a7363d41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
circular_buffer.h
dlib/sliding_buffer/circular_buffer.h
+6
-2
circular_buffer_abstract.h
dlib/sliding_buffer/circular_buffer_abstract.h
+9
-0
No files found.
dlib/sliding_buffer/circular_buffer.h
View file @
ae299a76
...
@@ -26,7 +26,11 @@ namespace dlib
...
@@ -26,7 +26,11 @@ namespace dlib
circular_buffer
()
circular_buffer
()
{
{
offset
=
0
;
}
explicit
circular_buffer
(
unsigned
long
s
)
{
resize
(
s
);
}
}
void
clear
(
void
clear
(
...
@@ -149,7 +153,7 @@ namespace dlib
...
@@ -149,7 +153,7 @@ namespace dlib
private
:
private
:
std
::
vector
<
T
>
data
;
std
::
vector
<
T
>
data
;
unsigned
long
offset
;
unsigned
long
offset
=
0
;
};
};
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
dlib/sliding_buffer/circular_buffer_abstract.h
View file @
ae299a76
...
@@ -49,6 +49,15 @@ namespace dlib
...
@@ -49,6 +49,15 @@ namespace dlib
- this object is properly initialized
- this object is properly initialized
!*/
!*/
explicit
circular_buffer
(
unsigned
long
s
);
/*!
ensures
- #size() == s
- this object is properly initialized
!*/
void
clear
(
void
clear
(
);
);
/*!
/*!
...
...
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