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
45ffc864
Commit
45ffc864
authored
Sep 06, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/StringCompare: add more function attributes
parent
19d9ce26
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
StringCompare.cxx
src/util/StringCompare.cxx
+1
-1
StringCompare.hxx
src/util/StringCompare.hxx
+4
-3
WStringCompare.cxx
src/util/WStringCompare.cxx
+1
-1
WStringCompare.hxx
src/util/WStringCompare.hxx
+4
-3
No files found.
src/util/StringCompare.cxx
View file @
45ffc864
/*
* Copyright
(C) 2013-2017
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2013-2018
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
...
...
src/util/StringCompare.hxx
View file @
45ffc864
/*
* Copyright
(C) 2013-2017
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2013-2018
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
...
...
@@ -38,6 +38,7 @@
#include "WStringCompare.hxx"
#endif
gcc_pure
gcc_nonnull_all
static
inline
bool
StringIsEmpty
(
const
char
*
string
)
noexcept
{
...
...
@@ -51,7 +52,7 @@ StringStartsWith(const char *haystack, StringView needle) noexcept
return
StringIsEqual
(
haystack
,
needle
.
data
,
needle
.
size
);
}
gcc_pure
gcc_pure
gcc_nonnull_all
bool
StringEndsWith
(
const
char
*
haystack
,
const
char
*
needle
)
noexcept
;
...
...
@@ -73,7 +74,7 @@ StringAfterPrefix(const char *haystack, StringView needle) noexcept
* Check if the given string ends with the specified suffix. If yes,
* returns the position of the suffix, and nullptr otherwise.
*/
gcc_pure
gcc_pure
gcc_nonnull_all
const
char
*
FindStringSuffix
(
const
char
*
p
,
const
char
*
suffix
)
noexcept
;
...
...
src/util/WStringCompare.cxx
View file @
45ffc864
/*
* Copyright
(C) 2013-2017
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2013-2018
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
...
...
src/util/WStringCompare.hxx
View file @
45ffc864
/*
* Copyright
(C) 2013-2015
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2013-2018
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
...
...
@@ -36,6 +36,7 @@
#include <wchar.h>
gcc_pure
gcc_nonnull_all
static
inline
bool
StringIsEmpty
(
const
wchar_t
*
string
)
noexcept
{
...
...
@@ -49,7 +50,7 @@ StringStartsWith(const wchar_t *haystack, WStringView needle) noexcept
return
StringIsEqual
(
haystack
,
needle
.
data
,
needle
.
size
);
}
gcc_pure
gcc_pure
gcc_nonnull_all
bool
StringEndsWith
(
const
wchar_t
*
haystack
,
const
wchar_t
*
needle
)
noexcept
;
...
...
@@ -71,7 +72,7 @@ StringAfterPrefix(const wchar_t *haystack, WStringView needle) noexcept
* Check if the given string ends with the specified suffix. If yes,
* returns the position of the suffix, and nullptr otherwise.
*/
gcc_pure
gcc_pure
gcc_nonnull_all
const
wchar_t
*
FindStringSuffix
(
const
wchar_t
*
p
,
const
wchar_t
*
suffix
)
noexcept
;
...
...
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