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
fe1f3df3
Commit
fe1f3df3
authored
Jan 24, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/StringBuffer: add "noexcept"
parent
4a330a4c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
StringBuffer.hxx
src/util/StringBuffer.hxx
+12
-12
No files found.
src/util/StringBuffer.hxx
View file @
fe1f3df3
/*
* Copyright (C) 2010-201
7
Max Kellermann <max.kellermann@gmail.com>
* Copyright (C) 2010-201
8
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
...
...
@@ -53,53 +53,53 @@ protected:
public
:
typedef
typename
Array
::
const_iterator
const_iterator
;
constexpr
size_type
capacity
()
const
{
constexpr
size_type
capacity
()
const
noexcept
{
return
CAPACITY
;
}
constexpr
bool
empty
()
const
{
constexpr
bool
empty
()
const
noexcept
{
return
front
()
==
SENTINEL
;
}
void
clear
()
{
void
clear
()
noexcept
{
the_data
[
0
]
=
SENTINEL
;
}
constexpr
const_pointer
c_str
()
const
{
constexpr
const_pointer
c_str
()
const
noexcept
{
return
&
the_data
.
front
();
}
pointer
data
()
{
pointer
data
()
noexcept
{
return
&
the_data
.
front
();
}
constexpr
value_type
front
()
const
{
constexpr
value_type
front
()
const
noexcept
{
return
the_data
.
front
();
}
/**
* Returns one character. No bounds checking.
*/
value_type
operator
[](
size_type
i
)
const
{
value_type
operator
[](
size_type
i
)
const
noexcept
{
return
the_data
[
i
];
}
/**
* Returns one writable character. No bounds checking.
*/
reference
operator
[](
size_type
i
)
{
reference
operator
[](
size_type
i
)
noexcept
{
return
the_data
[
i
];
}
constexpr
const_iterator
begin
()
const
{
constexpr
const_iterator
begin
()
const
noexcept
{
return
the_data
.
begin
();
}
constexpr
const_iterator
end
()
const
{
constexpr
const_iterator
end
()
const
noexcept
{
return
the_data
.
end
();
}
constexpr
operator
const_pointer
()
const
{
constexpr
operator
const_pointer
()
const
noexcept
{
return
c_str
();
}
};
...
...
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