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
e654c6e0
Commit
e654c6e0
authored
Jan 03, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/{Const,Writable}Buffer: use std::size_t
parent
4b0e288f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
10 deletions
+11
-10
AllocatedString.hxx
src/util/AllocatedString.hxx
+2
-1
ConstBuffer.hxx
src/util/ConstBuffer.hxx
+3
-3
ForeignFifoBuffer.hxx
src/util/ForeignFifoBuffer.hxx
+1
-1
StaticFifoBuffer.hxx
src/util/StaticFifoBuffer.hxx
+2
-2
WritableBuffer.hxx
src/util/WritableBuffer.hxx
+3
-3
No files found.
src/util/AllocatedString.hxx
View file @
e654c6e0
...
...
@@ -33,6 +33,7 @@
#include "StringPointer.hxx"
#include <algorithm>
#include <cstddef>
/**
* A string pointer whose memory is managed by this class.
...
...
@@ -47,7 +48,7 @@ public:
typedef
typename
StringPointer
<
T
>::
const_reference_type
const_reference_type
;
typedef
typename
StringPointer
<
T
>::
pointer_type
pointer_type
;
typedef
typename
StringPointer
<
T
>::
const_pointer_type
const_pointer_type
;
typedef
size_t
size_type
;
typedef
s
td
::
s
ize_t
size_type
;
static
constexpr
value_type
SENTINEL
=
'\0'
;
...
...
src/util/ConstBuffer.hxx
View file @
e654c6e0
/*
* Copyright
(C) 2013-2017
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2013-2020
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
...
...
@@ -43,7 +43,7 @@ struct ConstBuffer;
template
<>
struct
ConstBuffer
<
void
>
{
typedef
size_t
size_type
;
typedef
s
td
::
s
ize_t
size_type
;
typedef
void
value_type
;
typedef
const
void
*
pointer_type
;
typedef
pointer_type
const_pointer_type
;
...
...
@@ -91,7 +91,7 @@ struct ConstBuffer<void> {
*/
template
<
typename
T
>
struct
ConstBuffer
{
typedef
size_t
size_type
;
typedef
s
td
::
s
ize_t
size_type
;
typedef
T
value_type
;
typedef
const
T
&
reference_type
;
typedef
reference_type
const_reference_type
;
...
...
src/util/ForeignFifoBuffer.hxx
View file @
e654c6e0
...
...
@@ -51,7 +51,7 @@
template
<
typename
T
>
class
ForeignFifoBuffer
{
public
:
using
size_type
=
size_t
;
using
size_type
=
s
td
::
s
ize_t
;
using
Range
=
WritableBuffer
<
T
>
;
using
pointer_type
=
typename
Range
::
pointer_type
;
using
const_pointer_type
=
typename
Range
::
const_pointer_type
;
...
...
src/util/StaticFifoBuffer.hxx
View file @
e654c6e0
...
...
@@ -34,9 +34,9 @@
#include <utility>
#include <algorithm>
#include <cstddef>
#include <assert.h>
#include <stddef.h>
/**
* A first-in-first-out buffer: you can append data at the end, and
...
...
@@ -46,7 +46,7 @@
template
<
class
T
,
size_t
size
>
class
StaticFifoBuffer
{
public
:
using
size_type
=
size_t
;
using
size_type
=
s
td
::
s
ize_t
;
using
Range
=
WritableBuffer
<
T
>
;
protected
:
...
...
src/util/WritableBuffer.hxx
View file @
e654c6e0
/*
* Copyright
(C) 2013-2018
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2013-2020
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
...
...
@@ -44,7 +44,7 @@ struct WritableBuffer;
template
<>
struct
WritableBuffer
<
void
>
{
typedef
size_t
size_type
;
typedef
s
td
::
s
ize_t
size_type
;
typedef
void
value_type
;
typedef
void
*
pointer_type
;
typedef
const
void
*
const_pointer_type
;
...
...
@@ -90,7 +90,7 @@ struct WritableBuffer<void> {
*/
template
<
typename
T
>
struct
WritableBuffer
{
typedef
size_t
size_type
;
typedef
s
td
::
s
ize_t
size_type
;
typedef
T
value_type
;
typedef
T
&
reference_type
;
typedef
const
T
&
const_reference_type
;
...
...
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