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
59e4f1ee
Commit
59e4f1ee
authored
May 16, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: remove lots of GCC 4.8 fallback code
We can remove those C++11 and C++14 kludges because we require GCC 4.9 now.
parent
86a0a42a
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
4 additions
and
65 deletions
+4
-65
Helpers.cxx
src/db/Helpers.cxx
+0
-8
UpnpDatabasePlugin.cxx
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
+0
-4
SmbclientNeighborPlugin.cxx
src/neighbor/plugins/SmbclientNeighborPlugin.cxx
+0
-7
HttpdInternal.hxx
src/output/plugins/httpd/HttpdInternal.hxx
+1
-4
CompositeStorage.cxx
src/storage/CompositeStorage.cxx
+0
-5
Pool.cxx
src/tag/Pool.cxx
+1
-4
Set.cxx
src/tag/Set.cxx
+0
-4
Alloc.cxx
src/util/Alloc.cxx
+0
-21
Cast.hxx
src/util/Cast.hxx
+2
-8
No files found.
src/db/Helpers.cxx
View file @
59e4f1ee
...
...
@@ -46,19 +46,11 @@ StatsVisitTag(DatabaseStats &stats, StringSet &artists, StringSet &albums,
for
(
const
auto
&
item
:
tag
)
{
switch
(
item
.
type
)
{
case
TAG_ARTIST
:
#if CLANG_OR_GCC_VERSION(4,8)
artists
.
emplace
(
item
.
value
);
#else
artists
.
insert
(
item
.
value
);
#endif
break
;
case
TAG_ALBUM
:
#if CLANG_OR_GCC_VERSION(4,8)
albums
.
emplace
(
item
.
value
);
#else
albums
.
insert
(
item
.
value
);
#endif
break
;
default:
...
...
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
View file @
59e4f1ee
...
...
@@ -625,11 +625,7 @@ UpnpDatabase::VisitUniqueTags(const DatabaseSelection &selection,
const
char
*
value
=
dirent
.
tag
.
GetValue
(
tag
);
if
(
value
!=
nullptr
)
{
#if CLANG_OR_GCC_VERSION(4,8)
values
.
emplace
(
value
);
#else
values
.
insert
(
value
);
#endif
}
}
}
...
...
src/neighbor/plugins/SmbclientNeighborPlugin.cxx
View file @
59e4f1ee
...
...
@@ -212,14 +212,7 @@ SmbclientNeighborExplorer::Run()
prev
=
i
;
}
else
{
/* can't see it anymore: move to "lost" */
#if CLANG_OR_GCC_VERSION(4,7)
lost
.
splice_after
(
lost
.
before_begin
(),
list
,
prev
);
#else
/* the forward_list::splice_after() lvalue
reference overload is missing in gcc 4.6 */
lost
.
emplace_front
(
std
::
move
(
*
i
));
list
.
erase_after
(
prev
);
#endif
}
}
...
...
src/output/plugins/httpd/HttpdInternal.hxx
View file @
59e4f1ee
...
...
@@ -158,10 +158,7 @@ public:
static
HttpdOutput
*
Create
(
EventLoop
&
event_loop
,
const
ConfigBlock
&
block
);
#if CLANG_OR_GCC_VERSION(4,7)
constexpr
#endif
static
HttpdOutput
*
Cast
(
AudioOutput
*
ao
)
{
static
constexpr
HttpdOutput
*
Cast
(
AudioOutput
*
ao
)
{
return
&
ContainerCast
(
*
ao
,
&
HttpdOutput
::
base
);
}
...
...
src/storage/CompositeStorage.cxx
View file @
59e4f1ee
...
...
@@ -130,13 +130,8 @@ CompositeStorage::Directory::Make(const char *uri)
Directory
*
directory
=
this
;
while
(
*
uri
!=
0
)
{
const
std
::
string
name
=
NextSegment
(
uri
);
#if CLANG_OR_GCC_VERSION(4,8)
auto
i
=
directory
->
children
.
emplace
(
std
::
move
(
name
),
Directory
());
#else
auto
i
=
directory
->
children
.
insert
(
std
::
make_pair
(
std
::
move
(
name
),
Directory
()));
#endif
directory
=
&
i
.
first
->
second
;
}
...
...
src/tag/Pool.cxx
View file @
59e4f1ee
...
...
@@ -90,10 +90,7 @@ calc_hash(TagType type, const char *p)
return
hash
^
type
;
}
#if CLANG_OR_GCC_VERSION(4,7)
constexpr
#endif
static
inline
TagPoolSlot
*
static
inline
constexpr
TagPoolSlot
*
tag_item_to_slot
(
TagItem
*
item
)
{
return
&
ContainerCast
(
*
item
,
&
TagPoolSlot
::
item
);
...
...
src/tag/Set.cxx
View file @
59e4f1ee
...
...
@@ -76,11 +76,7 @@ TagSet::InsertUnique(const Tag &src, TagType type, const char *value,
else
builder
.
AddItem
(
type
,
value
);
CopyTagMask
(
builder
,
src
,
group_mask
);
#if CLANG_OR_GCC_VERSION(4,8)
emplace
(
builder
.
Commit
());
#else
insert
(
builder
.
Commit
());
#endif
}
bool
...
...
src/util/Alloc.cxx
View file @
59e4f1ee
...
...
@@ -76,8 +76,6 @@ xstrndup(const char *s, size_t n)
return
p
;
}
#if CLANG_OR_GCC_VERSION(4,7)
template
<
typename
...
Args
>
static
inline
size_t
FillLengths
(
size_t
*
lengths
,
const
char
*
a
,
Args
&&
...
args
)
...
...
@@ -107,14 +105,11 @@ StringCat(char *p, const size_t *lengths, const char *a)
memcpy
(
p
,
a
,
*
lengths
);
}
#endif
template
<
typename
...
Args
>
gcc_malloc
gcc_nonnull_all
static
inline
char
*
t_xstrcatdup
(
Args
&&
...
args
)
{
#if CLANG_OR_GCC_VERSION(4,7)
constexpr
size_t
n
=
sizeof
...(
args
);
size_t
lengths
[
n
];
...
...
@@ -124,22 +119,6 @@ t_xstrcatdup(Args&&... args)
StringCat
(
p
,
lengths
,
args
...);
p
[
total
]
=
0
;
return
p
;
#else
/* fallback implementation for gcc 4.6, because that old
compiler is too buggy to compile the above template
functions */
const
char
*
const
argv
[]
=
{
args
...
};
size_t
total
=
0
;
for
(
auto
i
:
argv
)
total
+=
strlen
(
i
);
char
*
p
=
(
char
*
)
xalloc
(
total
+
1
),
*
q
=
p
;
for
(
auto
i
:
argv
)
q
=
stpcpy
(
q
,
i
);
return
p
;
#endif
}
char
*
...
...
src/util/Cast.hxx
View file @
59e4f1ee
...
...
@@ -84,10 +84,7 @@ ContainerAttributeOffset(const A C::*p)
* Cast the given pointer to a struct member to its parent structure.
*/
template
<
class
C
,
class
A
>
#if CLANG_OR_GCC_VERSION(4,7)
constexpr
#endif
static
inline
C
&
static
inline
constexpr
C
&
ContainerCast
(
A
&
a
,
A
C
::*
member
)
{
return
*
OffsetCast
<
C
,
A
>
(
&
a
,
ContainerAttributeOffset
<
C
,
A
>
(
member
));
...
...
@@ -97,10 +94,7 @@ ContainerCast(A &a, A C::*member)
* Cast the given pointer to a struct member to its parent structure.
*/
template
<
class
C
,
class
A
>
#if CLANG_OR_GCC_VERSION(4,7)
constexpr
#endif
static
inline
const
C
&
static
inline
constexpr
const
C
&
ContainerCast
(
const
A
&
a
,
A
C
::*
member
)
{
return
*
OffsetCast
<
const
C
,
const
A
>
(
&
a
,
ContainerAttributeOffset
<
C
,
A
>
(
member
));
...
...
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