diff options
author | Zinovy Nis <zynis@yandex-team.ru> | 2018-05-17 03:29:10 +0900 |
---|---|---|
committer | Qijiang Fan <fqj@google.com> | 2020-06-05 09:23:10 +0900 |
commit | 9d154991edaaf839d50a5fdc72502876c08c09a4 (patch) | |
tree | feab3e12c7582a6542831de5de5e5c296471a189 /components | |
parent | ead77d13e906bb8a879b7c407d0cdc7ce3b8e87d (diff) | |
download | libchrome-9d154991edaaf839d50a5fdc72502876c08c09a4.tar.gz |
[clang-tidy] Readability fixes for src/components/[d-l].*
- Get rid of redundant .c_str() for std::string,
- Get rid of redundant .get() for std::unique_ptr,
- Get rid of redundant member initializations
- Replace NULL -> nullptr.
R=blundell@chromium.org, caitkp@chromium.org, jochen@chromium.org, sdefresne@chromium.org
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ic043a0bf296132eadd1b8a6e349d3a5f903fbaec
Reviewed-on: https://chromium-review.googlesource.com/1045965
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Alexander Yashkin <a-v-y@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#559197}
CrOS-Libchrome-Original-Commit: ead3f745666b12ade97a50b8ad48cab0d24e5afb
Diffstat (limited to 'components')
-rw-r--r-- | components/json_schema/json_schema_validator_unittest.cc | 2 | ||||
-rw-r--r-- | components/json_schema/json_schema_validator_unittest_base.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/components/json_schema/json_schema_validator_unittest.cc b/components/json_schema/json_schema_validator_unittest.cc index b37009238f..19fc6f9b20 100644 --- a/components/json_schema/json_schema_validator_unittest.cc +++ b/components/json_schema/json_schema_validator_unittest.cc @@ -11,7 +11,7 @@ class JSONSchemaValidatorCPPTest : public JSONSchemaValidatorTestBase { public: - JSONSchemaValidatorCPPTest() : JSONSchemaValidatorTestBase() {} + JSONSchemaValidatorCPPTest() {} protected: void ExpectValid(const std::string& test_source, diff --git a/components/json_schema/json_schema_validator_unittest_base.cc b/components/json_schema/json_schema_validator_unittest_base.cc index 6f8e079bbe..ce220dc479 100644 --- a/components/json_schema/json_schema_validator_unittest_base.cc +++ b/components/json_schema/json_schema_validator_unittest_base.cc @@ -46,7 +46,7 @@ base::Value* LoadValue(const std::string& filename) { base::Value* LoadValue(const std::string& filename, base::Value::Type type) { std::unique_ptr<base::Value> result(LoadValue(filename)); - if (!result.get()) + if (!result) return nullptr; if (result->type() != type) { ADD_FAILURE() << "Expected type " << type << ", got: " << result->type(); |