diff options
author | Vikram Gaur <vikramgaur@google.com> | 2022-03-24 05:30:16 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-03-24 05:30:16 +0000 |
commit | 3c9787c57c4de7c966d2f43f22b26dc145d739a4 (patch) | |
tree | 185c84cdb381e7778dedd07a03929ee6de377f9f /include/cppbor/cppbor.h | |
parent | 4c2bf0421e7dd5b05d8e3582ffcbe46f58441b58 (diff) | |
parent | b8b6bd82dbb1a24173d9b7dbb3c7d0b8f61b5175 (diff) | |
download | libcppbor-3c9787c57c4de7c966d2f43f22b26dc145d739a4.tar.gz |
Fixing minor bugs in libcppbor. am: 61d9bff960 am: b3cd49bcd1 am: 50685cc010 am: b8b6bd82db
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/2037164
Change-Id: I50e56232b94b2f2438ab4f0dfd57b66ea9210895
Diffstat (limited to 'include/cppbor/cppbor.h')
-rw-r--r-- | include/cppbor/cppbor.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/include/cppbor/cppbor.h b/include/cppbor/cppbor.h index 9bad233..8338441 100644 --- a/include/cppbor/cppbor.h +++ b/include/cppbor/cppbor.h @@ -25,6 +25,20 @@ #include <string> #include <string_view> #include <vector> +#include <algorithm> + +#ifdef OS_WINDOWS +#include <basetsd.h> + +#define ssize_t SSIZE_T +#endif // OS_WINDOWS + +#ifdef TRUE +#undef TRUE +#endif // TRUE +#ifdef FALSE +#undef FALSE +#endif // FALSE namespace cppbor { @@ -705,7 +719,7 @@ class Map : public Item { * * If the searched-for `key` is not present, returns `nullptr`. * - * Note that if the map is canonicalized (sorted), Map::get() peforms a binary search. If your + * Note that if the map is canonicalized (sorted), Map::get() performs a binary search. If your * map is large and you're searching in it many times, it may be worthwhile to canonicalize it * to make Map::get() faster. Any use of a method that might modify the map disables the * speedup. @@ -919,7 +933,7 @@ class Null : public Simple { * for unit tests. */ std::string prettyPrint(const Item* item, size_t maxBStrSize = 32, - const std::vector<std::string>& mapKeysNotToPrint = {}); + const std::vector<std::string>& mapKeysToNotPrint = {}); /** * Returns pretty-printed CBOR for |value|. @@ -934,7 +948,7 @@ std::string prettyPrint(const Item* item, size_t maxBStrSize = 32, * for unit tests. */ std::string prettyPrint(const std::vector<uint8_t>& encodedCbor, size_t maxBStrSize = 32, - const std::vector<std::string>& mapKeysNotToPrint = {}); + const std::vector<std::string>& mapKeysToNotPrint = {}); /** * Details. Mostly you shouldn't have to look below, except perhaps at the docstring for makeItem. |