remove std::make_pair

make_pair is an old C++98 function that can be replaced by modern
shorter constructs.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2021-09-07 20:58:23 -07:00
parent 15f419e1cb
commit 6ec5089cc9
10 changed files with 15 additions and 18 deletions

View File

@@ -85,7 +85,7 @@ public:
auto last = cdio_cddap_disc_lastsector(drv);
if (first < 0 || last < 0)
throw std::runtime_error("Failed to get disc audio sectors");
return std::make_pair(first, last);
return std::pair(first, last);
}
gcc_pure
@@ -98,7 +98,7 @@ public:
auto last = cdio_cddap_track_lastsector(drv, i);
if (first < 0 || last < 0)
throw std::runtime_error("Invalid track number");
return std::make_pair(first, last);
return std::pair(first, last);
}
gcc_pure

View File

@@ -152,7 +152,7 @@ public:
if (err < 0)
throw MakeFfmpegError(err, "avfilter_graph_parse_ptr() failed");
return std::make_pair(std::move(inputs), std::move(outputs));
return {std::move(inputs), std::move(outputs)};
}
void ParseSingleInOut(const char *filters, AVFilterContext &in,
@@ -165,7 +165,7 @@ public:
if (err < 0)
throw MakeFfmpegError(err, "avfilter_graph_parse2() failed");
return std::make_pair(FilterInOut{inputs}, FilterInOut{outputs});
return {FilterInOut{inputs}, FilterInOut{outputs}};
}
void CheckAndConfigure() {