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
3344953d
Commit
3344953d
authored
Aug 16, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/*FifoBuffer: use `using` instead of `typedef`
parent
f909615b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
DynamicFifoBuffer.hxx
src/util/DynamicFifoBuffer.hxx
+5
-5
ForeignFifoBuffer.hxx
src/util/ForeignFifoBuffer.hxx
+5
-5
StaticFifoBuffer.hxx
src/util/StaticFifoBuffer.hxx
+3
-5
No files found.
src/util/DynamicFifoBuffer.hxx
View file @
3344953d
/*
* Copyright 2003-201
8
Max Kellermann <max.kellermann@gmail.com>
* Copyright 2003-201
9
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
...
...
@@ -40,10 +40,10 @@
template
<
typename
T
>
class
DynamicFifoBuffer
:
protected
ForeignFifoBuffer
<
T
>
{
public
:
typedef
typename
ForeignFifoBuffer
<
T
>::
size_type
size_type
;
typedef
typename
ForeignFifoBuffer
<
T
>::
pointer_type
pointer_type
;
typedef
typename
ForeignFifoBuffer
<
T
>::
const_pointer_type
const_pointer_type
;
typedef
typename
ForeignFifoBuffer
<
T
>::
Range
Range
;
using
typename
ForeignFifoBuffer
<
T
>::
size_type
;
using
typename
ForeignFifoBuffer
<
T
>::
pointer_type
;
using
typename
ForeignFifoBuffer
<
T
>::
const_pointer_type
;
using
typename
ForeignFifoBuffer
<
T
>::
Range
;
explicit
DynamicFifoBuffer
(
size_type
_capacity
)
noexcept
:
ForeignFifoBuffer
<
T
>
(
new
T
[
_capacity
],
_capacity
)
{}
...
...
src/util/ForeignFifoBuffer.hxx
View file @
3344953d
/*
* Copyright
(C) 2003-2017
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2003-2019
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
...
...
@@ -51,10 +51,10 @@
template
<
typename
T
>
class
ForeignFifoBuffer
{
public
:
typedef
size_t
size_type
;
typedef
WritableBuffer
<
T
>
Range
;
typedef
typename
Range
::
pointer_type
pointer_type
;
typedef
typename
Range
::
const_pointer_type
const_pointer_type
;
using
size_type
=
size_t
;
using
Range
=
WritableBuffer
<
T
>
;
using
pointer_type
=
typename
Range
::
pointer_type
;
using
const_pointer_type
=
typename
Range
::
const_pointer_type
;
protected
:
size_type
head
=
0
,
tail
=
0
,
capacity
;
...
...
src/util/StaticFifoBuffer.hxx
View file @
3344953d
/*
* Copyright
(C) 2003-2017
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2003-2019
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
...
...
@@ -46,10 +46,8 @@
template
<
class
T
,
size_t
size
>
class
StaticFifoBuffer
{
public
:
typedef
size_t
size_type
;
public
:
typedef
WritableBuffer
<
T
>
Range
;
using
size_type
=
size_t
;
using
Range
=
WritableBuffer
<
T
>
;
protected
:
size_type
head
=
0
,
tail
=
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