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
32b7b2e2
Commit
32b7b2e2
authored
Jan 14, 2021
by
Max Kellermann
Committed by
Max Kellermann
Mar 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/AllocatedString: add default constructor
parent
cfb7f8ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
Collate.cxx
src/lib/icu/Collate.cxx
+1
-1
HttpdClient.cxx
src/output/plugins/httpd/HttpdClient.cxx
+1
-1
AllocatedString.hxx
src/util/AllocatedString.hxx
+3
-1
No files found.
src/lib/icu/Collate.cxx
View file @
32b7b2e2
...
...
@@ -88,7 +88,7 @@ IcuCollate(std::string_view a, std::string_view b) noexcept
b
.
data
(),
b
.
size
(),
&
code
);
#elif defined(_WIN32)
BasicAllocatedString
<
wchar_t
>
wa
=
nullptr
,
wb
=
nullptr
;
BasicAllocatedString
<
wchar_t
>
wa
,
wb
;
try
{
wa
=
MultiByteToWideChar
(
CP_UTF8
,
a
);
...
...
src/output/plugins/httpd/HttpdClient.cxx
View file @
32b7b2e2
...
...
@@ -136,7 +136,7 @@ bool
HttpdClient
::
SendResponse
()
noexcept
{
char
buffer
[
1024
];
AllocatedString
allocated
=
nullptr
;
AllocatedString
allocated
;
const
char
*
response
;
assert
(
state
==
State
::
RESPONSE
);
...
...
src/util/AllocatedString.hxx
View file @
32b7b2e2
...
...
@@ -55,12 +55,13 @@ public:
static
constexpr
value_type
SENTINEL
=
'\0'
;
private
:
pointer
value
;
pointer
value
=
nullptr
;
explicit
BasicAllocatedString
(
pointer
_value
)
noexcept
:
value
(
_value
)
{}
public
:
BasicAllocatedString
()
noexcept
=
default
;
BasicAllocatedString
(
std
::
nullptr_t
n
)
noexcept
:
value
(
n
)
{}
...
...
@@ -145,6 +146,7 @@ class AllocatedString : public BasicAllocatedString<char> {
public
:
using
BasicAllocatedString
::
BasicAllocatedString
;
AllocatedString
()
noexcept
=
default
;
AllocatedString
(
BasicAllocatedString
<
value_type
>
&&
src
)
noexcept
:
BasicAllocatedString
(
std
::
move
(
src
))
{}
};
...
...
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