Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
ed3220f3
Commit
ed3220f3
authored
Apr 24, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/{Foreign,Static}FifoBuffer: use C++11 initializers
parent
043cbec6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
ForeignFifoBuffer.hxx
src/util/ForeignFifoBuffer.hxx
+4
-4
StaticFifoBuffer.hxx
src/util/StaticFifoBuffer.hxx
+2
-5
No files found.
src/util/ForeignFifoBuffer.hxx
View file @
ed3220f3
/*
* Copyright (C) 2003-201
4
Max Kellermann <max.kellermann@gmail.com>
* Copyright (C) 2003-201
7
Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -57,15 +57,15 @@ public:
typedef
typename
Range
::
const_pointer_type
const_pointer_type
;
protected
:
size_type
head
,
tail
,
capacity
;
size_type
head
=
0
,
tail
=
0
,
capacity
;
T
*
data
;
public
:
explicit
constexpr
ForeignFifoBuffer
(
std
::
nullptr_t
n
)
:
head
(
0
),
tail
(
0
),
capacity
(
0
),
data
(
n
)
{}
:
capacity
(
0
),
data
(
n
)
{}
constexpr
ForeignFifoBuffer
(
T
*
_data
,
size_type
_capacity
)
:
head
(
0
),
tail
(
0
),
capacity
(
_capacity
),
data
(
_data
)
{}
:
capacity
(
_capacity
),
data
(
_data
)
{}
ForeignFifoBuffer
(
ForeignFifoBuffer
&&
src
)
:
head
(
src
.
head
),
tail
(
src
.
tail
),
...
...
src/util/StaticFifoBuffer.hxx
View file @
ed3220f3
/*
* Copyright (C) 2003-201
4
Max Kellermann <max.kellermann@gmail.com>
* Copyright (C) 2003-201
7
Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -52,13 +52,10 @@ public:
typedef
WritableBuffer
<
T
>
Range
;
protected
:
size_type
head
,
tail
;
size_type
head
=
0
,
tail
=
0
;
T
data
[
size
];
public
:
constexpr
StaticFifoBuffer
()
:
head
(
0
),
tail
(
0
)
{}
void
Shift
()
{
if
(
head
==
0
)
return
;
...
...
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