mirror of
https://github.com/revanced/aapt2.git
synced 2025-01-30 12:27:34 +01:00
fix: basic_string
inline templates patch (#9)
This commit is contained in:
commit
b907424500
1
build.sh
1
build.sh
@ -35,6 +35,7 @@ git apply patches/libpng.patch --whitespace=fix
|
|||||||
git apply patches/selinux.patch --whitespace=fix
|
git apply patches/selinux.patch --whitespace=fix
|
||||||
git apply patches/protobuf.patch --whitespace=fix
|
git apply patches/protobuf.patch --whitespace=fix
|
||||||
git apply patches/aapt2.patch --whitespace=fix
|
git apply patches/aapt2.patch --whitespace=fix
|
||||||
|
git apply patches/androidfw.patch --whitespace=fix
|
||||||
git apply patches/boringssl.patch --whitespace=fix
|
git apply patches/boringssl.patch --whitespace=fix
|
||||||
|
|
||||||
# Define all the compilers, libraries and targets.
|
# Define all the compilers, libraries and targets.
|
||||||
|
@ -1,17 +1,4 @@
|
|||||||
Submodule src/base contains modified content
|
Submodule src/base contains modified content
|
||||||
diff --git a/src/base/libs/androidfw/ResourceTypes.cpp b/src/base/libs/androidfw/ResourceTypes.cpp
|
|
||||||
index cae2d0bc16b3..13c5f8fc84e8 100644
|
|
||||||
--- a/src/base/libs/androidfw/ResourceTypes.cpp
|
|
||||||
+++ b/src/base/libs/androidfw/ResourceTypes.cpp
|
|
||||||
@@ -43,7 +43,7 @@
|
|
||||||
#include <utils/String16.h>
|
|
||||||
#include <utils/String8.h>
|
|
||||||
|
|
||||||
-#ifdef __ANDROID__
|
|
||||||
+#if 0
|
|
||||||
#include <binder/TextOutput.h>
|
|
||||||
|
|
||||||
#endif
|
|
||||||
diff --git a/src/base/tools/aapt2/ResourceTable.cpp b/src/base/tools/aapt2/ResourceTable.cpp
|
diff --git a/src/base/tools/aapt2/ResourceTable.cpp b/src/base/tools/aapt2/ResourceTable.cpp
|
||||||
index 8ab1493c6ab3..3a855f0f6866 100644
|
index 8ab1493c6ab3..3a855f0f6866 100644
|
||||||
--- a/src/base/tools/aapt2/ResourceTable.cpp
|
--- a/src/base/tools/aapt2/ResourceTable.cpp
|
||||||
|
57
patches/androidfw.patch
Normal file
57
patches/androidfw.patch
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
Submodule src/base contains modified content
|
||||||
|
diff --git a/src/base/libs/androidfw/ResourceTypes.cpp b/src/base/libs/androidfw/ResourceTypes.cpp
|
||||||
|
index cae2d0bc16b3..13c5f8fc84e8 100644
|
||||||
|
--- a/src/base/libs/androidfw/ResourceTypes.cpp
|
||||||
|
+++ b/src/base/libs/androidfw/ResourceTypes.cpp
|
||||||
|
@@ -43,7 +43,7 @@
|
||||||
|
#include <utils/String16.h>
|
||||||
|
#include <utils/String8.h>
|
||||||
|
|
||||||
|
-#ifdef __ANDROID__
|
||||||
|
+#if 0
|
||||||
|
#include <binder/TextOutput.h>
|
||||||
|
|
||||||
|
#endif
|
||||||
|
diff --git a/src/base/libs/androidfw/include/androidfw/StringPiece.h b/src/base/libs/androidfw/include/androidfw/StringPiece.h
|
||||||
|
index 921877dc4982..27e27e1c2b94 100644
|
||||||
|
--- a/src/base/libs/androidfw/include/androidfw/StringPiece.h
|
||||||
|
+++ b/src/base/libs/androidfw/include/androidfw/StringPiece.h
|
||||||
|
@@ -75,6 +75,11 @@ class BasicStringPiece {
|
||||||
|
bool operator>(const BasicStringPiece<TChar>& rhs) const;
|
||||||
|
bool operator==(const BasicStringPiece<TChar>& rhs) const;
|
||||||
|
bool operator!=(const BasicStringPiece<TChar>& rhs) const;
|
||||||
|
+ // for std::basic_string
|
||||||
|
+ bool operator<(const std::basic_string<TChar>& rhs) const;
|
||||||
|
+ bool operator>(const std::basic_string<TChar>& rhs) const;
|
||||||
|
+ bool operator==(const std::basic_string<TChar>& rhs) const;
|
||||||
|
+ bool operator!=(const std::basic_string<TChar>& rhs) const;
|
||||||
|
|
||||||
|
const_iterator begin() const;
|
||||||
|
const_iterator end() const;
|
||||||
|
@@ -256,6 +261,26 @@ inline bool BasicStringPiece<TChar>::operator!=(const BasicStringPiece<TChar>& r
|
||||||
|
return compare(rhs) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+template <typename TChar>
|
||||||
|
+inline bool BasicStringPiece<TChar>::operator<(const std::basic_string<TChar>& rhs) const {
|
||||||
|
+ return compare(BasicStringPiece(rhs)) < 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+template <typename TChar>
|
||||||
|
+inline bool BasicStringPiece<TChar>::operator>(const std::basic_string<TChar>& rhs) const {
|
||||||
|
+ return compare(BasicStringPiece(rhs)) > 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+template <typename TChar>
|
||||||
|
+inline bool BasicStringPiece<TChar>::operator==(const std::basic_string<TChar>& rhs) const {
|
||||||
|
+ return compare(BasicStringPiece(rhs)) == 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+template <typename TChar>
|
||||||
|
+inline bool BasicStringPiece<TChar>::operator!=(const std::basic_string<TChar>& rhs) const{
|
||||||
|
+ return compare(BasicStringPiece(rhs)) != 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
template <typename TChar>
|
||||||
|
inline typename BasicStringPiece<TChar>::const_iterator BasicStringPiece<TChar>::begin() const {
|
||||||
|
return data_;
|
Loading…
x
Reference in New Issue
Block a user