Merge "Fix/suppress aapt/aapt2 google-explicit-constructor warnings" am: cdf6be573f
am: d42fe48c93
Change-Id: Ie418def364cdff53ba02a07d9979f10dcd819698
This commit is contained in:
@@ -29,7 +29,7 @@ struct ConfigDescription : public android::ResTable_config {
|
|||||||
size = sizeof(android::ResTable_config);
|
size = sizeof(android::ResTable_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigDescription(const android::ResTable_config&o) { // NOLINT(implicit)
|
ConfigDescription(const android::ResTable_config&o) { // NOLINT(google-explicit-constructor)
|
||||||
*static_cast<android::ResTable_config*>(this) = o;
|
*static_cast<android::ResTable_config*>(this) = o;
|
||||||
size = sizeof(android::ResTable_config);
|
size = sizeof(android::ResTable_config);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ class XmlPrinter : public xml::ConstVisitor {
|
|||||||
public:
|
public:
|
||||||
using xml::ConstVisitor::Visit;
|
using xml::ConstVisitor::Visit;
|
||||||
|
|
||||||
XmlPrinter(Printer* printer) : printer_(printer) {
|
explicit XmlPrinter(Printer* printer) : printer_(printer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Visit(const xml::Element* el) override {
|
void Visit(const xml::Element* el) override {
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ struct ResourceNameRef {
|
|||||||
ResourceNameRef() = default;
|
ResourceNameRef() = default;
|
||||||
ResourceNameRef(const ResourceNameRef&) = default;
|
ResourceNameRef(const ResourceNameRef&) = default;
|
||||||
ResourceNameRef(ResourceNameRef&&) = default;
|
ResourceNameRef(ResourceNameRef&&) = default;
|
||||||
ResourceNameRef(const ResourceName& rhs); // NOLINT(implicit)
|
ResourceNameRef(const ResourceName& rhs); // NOLINT(google-explicit-constructor)
|
||||||
ResourceNameRef(const android::StringPiece& p, ResourceType t, const android::StringPiece& e);
|
ResourceNameRef(const android::StringPiece& p, ResourceType t, const android::StringPiece& e);
|
||||||
ResourceNameRef& operator=(const ResourceNameRef& rhs) = default;
|
ResourceNameRef& operator=(const ResourceNameRef& rhs) = default;
|
||||||
ResourceNameRef& operator=(ResourceNameRef&& rhs) = default;
|
ResourceNameRef& operator=(ResourceNameRef&& rhs) = default;
|
||||||
@@ -139,7 +139,7 @@ struct ResourceId {
|
|||||||
|
|
||||||
ResourceId();
|
ResourceId();
|
||||||
ResourceId(const ResourceId& rhs);
|
ResourceId(const ResourceId& rhs);
|
||||||
ResourceId(uint32_t res_id); // NOLINT(implicit)
|
ResourceId(uint32_t res_id); // NOLINT(google-explicit-constructor)
|
||||||
ResourceId(uint8_t p, uint8_t t, uint16_t e);
|
ResourceId(uint8_t p, uint8_t t, uint16_t e);
|
||||||
|
|
||||||
bool is_valid() const;
|
bool is_valid() const;
|
||||||
|
|||||||
@@ -645,7 +645,7 @@ static bool CompileFile(IAaptContext* context, const CompileOptions& options,
|
|||||||
|
|
||||||
class CompileContext : public IAaptContext {
|
class CompileContext : public IAaptContext {
|
||||||
public:
|
public:
|
||||||
CompileContext(IDiagnostics* diagnostics) : diagnostics_(diagnostics) {
|
explicit CompileContext(IDiagnostics* diagnostics) : diagnostics_(diagnostics) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PackageType GetPackageType() override {
|
PackageType GetPackageType() override {
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ struct LinkOptions {
|
|||||||
|
|
||||||
class LinkContext : public IAaptContext {
|
class LinkContext : public IAaptContext {
|
||||||
public:
|
public:
|
||||||
LinkContext(IDiagnostics* diagnostics)
|
explicit LinkContext(IDiagnostics* diagnostics)
|
||||||
: diagnostics_(diagnostics), name_mangler_({}), symbols_(&name_mangler_) {
|
: diagnostics_(diagnostics), name_mangler_({}), symbols_(&name_mangler_) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +226,7 @@ class LinkContext : public IAaptContext {
|
|||||||
// See b/37498913.
|
// See b/37498913.
|
||||||
class FeatureSplitSymbolTableDelegate : public DefaultSymbolTableDelegate {
|
class FeatureSplitSymbolTableDelegate : public DefaultSymbolTableDelegate {
|
||||||
public:
|
public:
|
||||||
FeatureSplitSymbolTableDelegate(IAaptContext* context) : context_(context) {
|
explicit FeatureSplitSymbolTableDelegate(IAaptContext* context) : context_(context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~FeatureSplitSymbolTableDelegate() = default;
|
virtual ~FeatureSplitSymbolTableDelegate() = default;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class KeepSet {
|
|||||||
public:
|
public:
|
||||||
KeepSet() = default;
|
KeepSet() = default;
|
||||||
|
|
||||||
KeepSet(bool conditional_keep_rules) : conditional_keep_rules_(conditional_keep_rules) {
|
explicit KeepSet(bool conditional_keep_rules) : conditional_keep_rules_(conditional_keep_rules) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void AddManifestClass(const UsageLocation& file, const std::string& class_name) {
|
inline void AddManifestClass(const UsageLocation& file, const std::string& class_name) {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class XmlCompatVersioner {
|
|||||||
public:
|
public:
|
||||||
using Rules = std::unordered_map<ResourceId, std::unique_ptr<IDegradeRule>>;
|
using Rules = std::unordered_map<ResourceId, std::unique_ptr<IDegradeRule>>;
|
||||||
|
|
||||||
XmlCompatVersioner(const Rules* rules);
|
explicit XmlCompatVersioner(const Rules* rules);
|
||||||
|
|
||||||
std::vector<std::unique_ptr<xml::XmlResource>> Process(IAaptContext* context,
|
std::vector<std::unique_ptr<xml::XmlResource>> Process(IAaptContext* context,
|
||||||
xml::XmlResource* doc,
|
xml::XmlResource* doc,
|
||||||
@@ -83,7 +83,7 @@ struct ReplacementAttr {
|
|||||||
|
|
||||||
class DegradeToManyRule : public IDegradeRule {
|
class DegradeToManyRule : public IDegradeRule {
|
||||||
public:
|
public:
|
||||||
DegradeToManyRule(std::vector<ReplacementAttr> attrs);
|
explicit DegradeToManyRule(std::vector<ReplacementAttr> attrs);
|
||||||
virtual ~DegradeToManyRule() = default;
|
virtual ~DegradeToManyRule() = default;
|
||||||
|
|
||||||
std::vector<DegradeResult> Degrade(const xml::Element& src_el, const xml::Attribute& src_attr,
|
std::vector<DegradeResult> Degrade(const xml::Element& src_el, const xml::Attribute& src_attr,
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class SymbolTable {
|
|||||||
bool is_dynamic = false;
|
bool is_dynamic = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
SymbolTable(NameMangler* mangler);
|
explicit SymbolTable(NameMangler* mangler);
|
||||||
|
|
||||||
// Overrides the default ISymbolTableDelegate, which allows a custom defined strategy for
|
// Overrides the default ISymbolTableDelegate, which allows a custom defined strategy for
|
||||||
// looking up resources from a set of sources.
|
// looking up resources from a set of sources.
|
||||||
|
|||||||
@@ -173,10 +173,12 @@ class ValueEqImpl : public ::testing::MatcherInterface<T> {
|
|||||||
template <typename TValue>
|
template <typename TValue>
|
||||||
class ValueEqMatcher {
|
class ValueEqMatcher {
|
||||||
public:
|
public:
|
||||||
|
// NOLINTNEXTLINE(google-explicit-constructor)
|
||||||
ValueEqMatcher(TValue expected) : expected_(std::move(expected)) {
|
ValueEqMatcher(TValue expected) : expected_(std::move(expected)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
// NOLINTNEXTLINE(google-explicit-constructor)
|
||||||
operator ::testing::Matcher<T>() const {
|
operator ::testing::Matcher<T>() const {
|
||||||
return ::testing::Matcher<T>(new ValueEqImpl<T>(&expected_));
|
return ::testing::Matcher<T>(new ValueEqImpl<T>(&expected_));
|
||||||
}
|
}
|
||||||
@@ -188,10 +190,12 @@ class ValueEqMatcher {
|
|||||||
template <typename TValue>
|
template <typename TValue>
|
||||||
class ValueEqPointerMatcher {
|
class ValueEqPointerMatcher {
|
||||||
public:
|
public:
|
||||||
|
// NOLINTNEXTLINE(google-explicit-constructor)
|
||||||
ValueEqPointerMatcher(const TValue* expected) : expected_(expected) {
|
ValueEqPointerMatcher(const TValue* expected) : expected_(expected) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
// NOLINTNEXTLINE(google-explicit-constructor)
|
||||||
operator ::testing::Matcher<T>() const {
|
operator ::testing::Matcher<T>() const {
|
||||||
return ::testing::Matcher<T>(new ValueEqImpl<T>(expected_));
|
return ::testing::Matcher<T>(new ValueEqImpl<T>(expected_));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ class Maybe {
|
|||||||
Maybe(const Maybe& rhs);
|
Maybe(const Maybe& rhs);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
Maybe(const Maybe<U>& rhs); // NOLINT(implicit)
|
Maybe(const Maybe<U>& rhs); // NOLINT(google-explicit-constructor)
|
||||||
|
|
||||||
Maybe(Maybe&& rhs) noexcept;
|
Maybe(Maybe&& rhs) noexcept;
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
Maybe(Maybe<U>&& rhs); // NOLINT(implicit)
|
Maybe(Maybe<U>&& rhs); // NOLINT(google-explicit-constructor)
|
||||||
|
|
||||||
Maybe& operator=(const Maybe& rhs);
|
Maybe& operator=(const Maybe& rhs);
|
||||||
|
|
||||||
@@ -64,12 +64,12 @@ class Maybe {
|
|||||||
/**
|
/**
|
||||||
* Construct a Maybe holding a value.
|
* Construct a Maybe holding a value.
|
||||||
*/
|
*/
|
||||||
Maybe(const T& value); // NOLINT(implicit)
|
Maybe(const T& value); // NOLINT(google-explicit-constructor)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a Maybe holding a value.
|
* Construct a Maybe holding a value.
|
||||||
*/
|
*/
|
||||||
Maybe(T&& value); // NOLINT(implicit)
|
Maybe(T&& value); // NOLINT(google-explicit-constructor)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* True if this holds a value, false if
|
* True if this holds a value, false if
|
||||||
|
|||||||
Reference in New Issue
Block a user