Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d31abf85 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski
Browse files

tests/resolv_gold_test - fix performance-unnecessary-value-param warning



Fixes:
  packages/modules/DnsResolver/tests/resolv_gold_test.cpp:391:73: warning: the parameter 'info' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
    static std::string Name(::testing::TestParamInfo<GoldTestParamType> info) {
                                                                        ^
                            const                                      &

Test: builds
Bug: 153035880
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: I619b9664ffa5f3cd8a99cb0b36e13315383630ee
parent b77afa0a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -388,7 +388,7 @@ using GoldTestParamType = std::tuple<DnsProtocol, std::string /* filename */>;
class ResolvGoldTest : public TestBase, public ::testing::WithParamInterface<GoldTestParamType> {
  public:
    // Generate readable string for test name from test parameters.
    static std::string Name(::testing::TestParamInfo<GoldTestParamType> info) {
    static std::string Name(const ::testing::TestParamInfo<GoldTestParamType>& info) {
        const auto& [protocol, file] = info.param;
        std::string name = StringPrintf(
                "%s_%s", protocol == DnsProtocol::CLEARTEXT ? "CLEARTEXT" : "TLS", file.c_str());