Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
ae299a76
Commit
ae299a76
authored
Jan 26, 2018
by
Davis King
Browse files
Gave circular_buffer a constructor that takes the size.
parent
a7363d41
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
dlib/sliding_buffer/circular_buffer.h
dlib/sliding_buffer/circular_buffer.h
+6
-2
dlib/sliding_buffer/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
circular_buffer
()
{
offset
=
0
;
}
explicit
circular_buffer
(
unsigned
long
s
)
{
resize
(
s
);
}
void
clear
(
...
...
@@ -149,7 +153,7 @@ namespace dlib
private:
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
- this object is properly initialized
!*/
explicit
circular_buffer
(
unsigned
long
s
);
/*!
ensures
- #size() == s
- this object is properly initialized
!*/
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