Loading tools/aapt2/LoadedApk.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ bool LoadedApk::WriteToArchive(IAaptContext* context, const TableFlattenerOption std::string path = file->GetSource().path; // The name of the path has the format "<zip-file-name>@<path-to-file>". path = path.substr(path.find("@") + 1); path = path.substr(path.find('@') + 1); // Skip resources that are not referenced if requested. if (path.find("res/") == 0 && referenced_resources.find(path) == referenced_resources.end()) { Loading tools/aapt2/cmd/Link.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -915,7 +915,7 @@ class LinkCommand { bool WriteJavaFile(ResourceTable* table, const StringPiece& package_name_to_generate, const StringPiece& out_package, const JavaClassGeneratorOptions& java_options, const Maybe<std::string> out_text_symbols_path = {}) { const Maybe<std::string>& out_text_symbols_path = {}) { if (!options_.generate_java_class_path) { return true; } Loading tools/aapt2/util/Util.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -520,11 +520,10 @@ bool Tokenizer::iterator::operator!=(const iterator& rhs) const { return !(*this == rhs); } Tokenizer::iterator::iterator(StringPiece s, char sep, StringPiece tok, bool end) Tokenizer::iterator::iterator(const StringPiece& s, char sep, const StringPiece& tok, bool end) : str_(s), separator_(sep), token_(tok), end_(end) {} Tokenizer::Tokenizer(StringPiece str, char sep) Tokenizer::Tokenizer(const StringPiece& str, char sep) : begin_(++iterator(str, sep, StringPiece(str.begin() - 1, 0), false)), end_(str, sep, StringPiece(str.end(), 0), true) {} Loading tools/aapt2/util/Util.h +2 −2 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ class Tokenizer { private: friend class Tokenizer; iterator(android::StringPiece s, char sep, android::StringPiece tok, bool end); iterator(const android::StringPiece& s, char sep, const android::StringPiece& tok, bool end); android::StringPiece str_; char separator_; Loading @@ -248,7 +248,7 @@ class Tokenizer { bool end_; }; Tokenizer(android::StringPiece str, char sep); Tokenizer(const android::StringPiece& str, char sep); iterator begin() { return begin_; } Loading Loading
tools/aapt2/LoadedApk.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ bool LoadedApk::WriteToArchive(IAaptContext* context, const TableFlattenerOption std::string path = file->GetSource().path; // The name of the path has the format "<zip-file-name>@<path-to-file>". path = path.substr(path.find("@") + 1); path = path.substr(path.find('@') + 1); // Skip resources that are not referenced if requested. if (path.find("res/") == 0 && referenced_resources.find(path) == referenced_resources.end()) { Loading
tools/aapt2/cmd/Link.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -915,7 +915,7 @@ class LinkCommand { bool WriteJavaFile(ResourceTable* table, const StringPiece& package_name_to_generate, const StringPiece& out_package, const JavaClassGeneratorOptions& java_options, const Maybe<std::string> out_text_symbols_path = {}) { const Maybe<std::string>& out_text_symbols_path = {}) { if (!options_.generate_java_class_path) { return true; } Loading
tools/aapt2/util/Util.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -520,11 +520,10 @@ bool Tokenizer::iterator::operator!=(const iterator& rhs) const { return !(*this == rhs); } Tokenizer::iterator::iterator(StringPiece s, char sep, StringPiece tok, bool end) Tokenizer::iterator::iterator(const StringPiece& s, char sep, const StringPiece& tok, bool end) : str_(s), separator_(sep), token_(tok), end_(end) {} Tokenizer::Tokenizer(StringPiece str, char sep) Tokenizer::Tokenizer(const StringPiece& str, char sep) : begin_(++iterator(str, sep, StringPiece(str.begin() - 1, 0), false)), end_(str, sep, StringPiece(str.end(), 0), true) {} Loading
tools/aapt2/util/Util.h +2 −2 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ class Tokenizer { private: friend class Tokenizer; iterator(android::StringPiece s, char sep, android::StringPiece tok, bool end); iterator(const android::StringPiece& s, char sep, const android::StringPiece& tok, bool end); android::StringPiece str_; char separator_; Loading @@ -248,7 +248,7 @@ class Tokenizer { bool end_; }; Tokenizer(android::StringPiece str, char sep); Tokenizer(const android::StringPiece& str, char sep); iterator begin() { return begin_; } Loading