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
3a51fe31
Commit
3a51fe31
authored
Apr 06, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/ConstBuffer, ...: use `using` instead of `typedef`
parent
cc3e71d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
32 deletions
+32
-32
ConstBuffer.hxx
src/util/ConstBuffer.hxx
+13
-13
StringBuffer.hxx
src/util/StringBuffer.hxx
+6
-6
WritableBuffer.hxx
src/util/WritableBuffer.hxx
+13
-13
No files found.
src/util/ConstBuffer.hxx
View file @
3a51fe31
...
@@ -44,11 +44,11 @@ struct ConstBuffer;
...
@@ -44,11 +44,11 @@ struct ConstBuffer;
template
<>
template
<>
struct
ConstBuffer
<
void
>
{
struct
ConstBuffer
<
void
>
{
typedef
std
::
size_t
size_type
;
typedef
std
::
size_t
size_type
;
typedef
void
value_type
;
using
value_type
=
void
;
typedef
const
void
*
pointer
;
using
pointer
=
const
void
*
;
typedef
pointer
const_
pointer
;
using
const_pointer
=
pointer
;
typedef
pointer
iterato
r
;
using
iterator
=
pointe
r
;
typedef
pointer
const_iterato
r
;
using
const_iterator
=
pointe
r
;
pointer
data
;
pointer
data
;
size_type
size
;
size_type
size
;
...
@@ -91,14 +91,14 @@ struct ConstBuffer<void> {
...
@@ -91,14 +91,14 @@ struct ConstBuffer<void> {
*/
*/
template
<
typename
T
>
template
<
typename
T
>
struct
ConstBuffer
{
struct
ConstBuffer
{
typedef
std
::
size_t
size_type
;
using
size_type
=
std
::
size_t
;
typedef
T
value_type
;
using
value_type
=
T
;
typedef
const
T
&
reference
;
using
reference
=
const
T
&
;
typedef
reference
const_
reference
;
using
const_reference
=
reference
;
typedef
const
T
*
pointer
;
using
pointer
=
const
T
*
;
typedef
pointer
const_
pointer
;
using
const_pointer
=
pointer
;
typedef
pointer
iterato
r
;
using
iterator
=
pointe
r
;
typedef
pointer
const_iterato
r
;
using
const_iterator
=
pointe
r
;
pointer
data
;
pointer
data
;
size_type
size
;
size_type
size
;
...
...
src/util/StringBuffer.hxx
View file @
3a51fe31
...
@@ -39,19 +39,19 @@ template<typename T, std::size_t CAPACITY>
...
@@ -39,19 +39,19 @@ template<typename T, std::size_t CAPACITY>
class
BasicStringBuffer
{
class
BasicStringBuffer
{
public
:
public
:
typedef
T
value_type
;
typedef
T
value_type
;
typedef
T
&
reference
;
using
reference
=
T
&
;
typedef
T
*
pointer
;
using
pointer
=
T
*
;
typedef
const
T
*
const_pointer
;
using
const_pointer
=
const
T
*
;
typedef
std
::
size_t
size_type
;
using
size_type
=
std
::
size_t
;
static
constexpr
value_type
SENTINEL
=
'\0'
;
static
constexpr
value_type
SENTINEL
=
'\0'
;
protected
:
protected
:
typedef
std
::
array
<
value_type
,
CAPACITY
>
Array
;
using
Array
=
std
::
array
<
value_type
,
CAPACITY
>
;
Array
the_data
;
Array
the_data
;
public
:
public
:
typedef
typename
Array
::
const_iterator
const_iterator
;
using
const_iterator
=
typename
Array
::
const_iterator
;
constexpr
size_type
capacity
()
const
noexcept
{
constexpr
size_type
capacity
()
const
noexcept
{
return
CAPACITY
;
return
CAPACITY
;
...
...
src/util/WritableBuffer.hxx
View file @
3a51fe31
...
@@ -45,11 +45,11 @@ struct WritableBuffer;
...
@@ -45,11 +45,11 @@ struct WritableBuffer;
template
<>
template
<>
struct
WritableBuffer
<
void
>
{
struct
WritableBuffer
<
void
>
{
typedef
std
::
size_t
size_type
;
typedef
std
::
size_t
size_type
;
typedef
void
value_type
;
using
value_type
=
void
;
typedef
void
*
pointer
;
using
pointer
=
void
*
;
typedef
const
void
*
const_pointer
;
using
const_pointer
=
const
void
*
;
typedef
pointer
iterato
r
;
using
iterator
=
pointe
r
;
typedef
const_pointer
const_iterato
r
;
using
const_iterator
=
const_pointe
r
;
pointer
data
;
pointer
data
;
size_type
size
;
size_type
size
;
...
@@ -90,14 +90,14 @@ struct WritableBuffer<void> {
...
@@ -90,14 +90,14 @@ struct WritableBuffer<void> {
*/
*/
template
<
typename
T
>
template
<
typename
T
>
struct
WritableBuffer
{
struct
WritableBuffer
{
typedef
std
::
size_t
size_type
;
using
size_type
=
std
::
size_t
;
typedef
T
value_type
;
using
value_type
=
T
;
typedef
T
&
reference
;
using
reference
=
T
&
;
typedef
const
T
&
const_reference
;
using
const_reference
=
const
T
&
;
typedef
T
*
pointer
;
using
pointer
=
T
*
;
typedef
const
T
*
const_pointer
;
using
const_pointer
=
const
T
*
;
typedef
pointer
iterato
r
;
using
iterator
=
pointe
r
;
typedef
const_pointer
const_iterato
r
;
using
const_iterator
=
const_pointe
r
;
pointer
data
;
pointer
data
;
size_type
size
;
size_type
size
;
...
...
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