chromium/chromium-84-std-vector-const.patch

50 lines
2.0 KiB
Diff
Raw Normal View History

2020-07-15 16:13:12 +00:00
From df982a547c5e88777a6134e5d18a1482d933f1cf Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Wed, 27 May 2020 10:38:26 +0000
Subject: [PATCH] libstdc++: std::vector must have non-const value_type
Bug: 957519
Change-Id: I535b3bcf318f98cecbf4be1520ffe4126abcacd8
---
diff --git a/extensions/common/features/feature_flags.cc b/extensions/common/features/feature_flags.cc
index 5b63764..7efa308 100644
--- a/extensions/common/features/feature_flags.cc
+++ b/extensions/common/features/feature_flags.cc
@@ -19,7 +19,7 @@
constexpr base::Feature kFeatureFlags[] = {
{"DeclarativeNetRequest", base::FEATURE_ENABLED_BY_DEFAULT}};
-const std::vector<const base::Feature>* g_feature_flags_test_override = nullptr;
+const std::vector<base::Feature>* g_feature_flags_test_override = nullptr;
template <typename T>
const base::Feature* GetFeature(T begin,
@@ -52,8 +52,8 @@
}
ScopedFeatureFlagsOverride CreateScopedFeatureFlagsOverrideForTesting(
- const std::vector<const base::Feature>* features) {
- return base::AutoReset<const std::vector<const base::Feature>*>(
+ const std::vector<base::Feature>* features) {
+ return base::AutoReset<const std::vector<base::Feature>*>(
&g_feature_flags_test_override, features);
}
diff --git a/extensions/common/features/feature_flags.h b/extensions/common/features/feature_flags.h
index d1a5dd3..b57740b 100644
--- a/extensions/common/features/feature_flags.h
+++ b/extensions/common/features/feature_flags.h
@@ -25,9 +25,9 @@
// in scope. Clients must ensure that |features| remains alive (non-dangling)
// while the returned value is in scope.
using ScopedFeatureFlagsOverride =
- base::AutoReset<const std::vector<const base::Feature>*>;
+ base::AutoReset<const std::vector<base::Feature>*>;
ScopedFeatureFlagsOverride CreateScopedFeatureFlagsOverrideForTesting(
- const std::vector<const base::Feature>* features);
+ const std::vector<base::Feature>* features);
} // namespace extensions