diff options
| author | Yabin Cui <yabinc@google.com> | 2020-04-29 10:37:03 -0700 |
|---|---|---|
| committer | Yabin Cui <yabinc@google.com> | 2020-04-29 10:44:11 -0700 |
| commit | 169c9dc7839af2d170110d43e9a1e220f5955e60 (patch) | |
| tree | 755a65aaccbab14828aec29eb9bccdb4cc9b703c /server/BandwidthController.cpp | |
| parent | d2896dd13a3de961a3997fecf673917abf28267e (diff) | |
BandwidthController: fix performance-no-automatic-move warning.
In the next compiler update, it reports the below warning as error:
system/netd/server/BandwidthController.cpp:263:12: error:
constness of 'ipt_basic_accounting_commands' prevents automatic move
[performance-no-automatic-move,-warnings-as-errors]
return ipt_basic_accounting_commands;
Bug: 149839606
Test: build.
Change-Id: I32ee491b0de6a986dc66de06a4f56d980f794136
Diffstat (limited to 'server/BandwidthController.cpp')
| -rw-r--r-- | server/BandwidthController.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/BandwidthController.cpp b/server/BandwidthController.cpp index cddaa961..a179872c 100644 --- a/server/BandwidthController.cpp +++ b/server/BandwidthController.cpp @@ -212,8 +212,8 @@ static const uint32_t uidBillingMask = Fwmark::getUidBillingMask(); * See go/ipsec-data-accounting for more information. */ -const std::vector<std::string> getBasicAccountingCommands(const bool useBpf) { - const std::vector<std::string> ipt_basic_accounting_commands = { +std::vector<std::string> getBasicAccountingCommands(const bool useBpf) { + std::vector<std::string> ipt_basic_accounting_commands = { "*filter", "-A bw_INPUT -j bw_global_alert", @@ -263,7 +263,6 @@ const std::vector<std::string> getBasicAccountingCommands(const bool useBpf) { return ipt_basic_accounting_commands; } - std::vector<std::string> toStrVec(int num, const char* const strs[]) { return std::vector<std::string>(strs, strs + num); } |
