Skip to content

Commit 16528ca

Browse files
author
pippocao
committed
Merge branch 'develop'
2 parents 008fc50 + 4e429ce commit 16528ca

File tree

271 files changed

+3841
-13266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+3841
-13266
lines changed

CHANGELOG.md

+4-2

README.md

+2-2

README_CHS.md

+2-2
24.5 KB
Binary file not shown.

bin/tools/linux32/BqLog_LogDecoder

24.2 KB
Binary file not shown.
77.4 KB
Binary file not shown.

bin/tools/linux64/BqLog_LogDecoder

71.5 KB
Binary file not shown.
1.05 KB
Binary file not shown.
Binary file not shown.
1.52 KB
Binary file not shown.
Binary file not shown.
2.44 KB
Binary file not shown.
1.45 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 KB
Binary file not shown.
24 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9.5 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
48 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dist/dynamic_lib/include/bq_common/bq_common_public_include.h

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "bq_common/types/array.h"
3333
#include "bq_common/types/string.h"
3434
#include "bq_common/types/hash_map.h"
35-
#include "bq_common/types/optional.h"
3635
#include "bq_common/types/basic_types.h"
3736
#if defined(BQ_GCC)
3837
#pragma GCC diagnostic pop

dist/dynamic_lib/include/bq_common/types/optional.h

-309
This file was deleted.

dist/dynamic_lib/include/bq_common/types/string_impl.h

+12-1
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ namespace bq {
7272
if (0 == len2) {
7373
return nullptr;
7474
}
75+
auto len1 = ___string_len(str1);
7576
const CHAR_TYPE* begin_pos = ___find_char(str1, *str2);
76-
while (begin_pos) {
77+
while (begin_pos && begin_pos + len2 <= str1 + len1) {
7778
if (memcmp(begin_pos, str2, len2 * sizeof(CHAR_TYPE)) == 0) {
7879
return begin_pos;
7980
}
@@ -268,6 +269,13 @@ namespace bq {
268269
template <typename CHAR_TYPE>
269270
inline bool string_base<CHAR_TYPE>::operator==(const typename string_base<CHAR_TYPE>::char_type* str) const
270271
{
272+
size_t compare_size = str ? ___string_len(str) : 0;
273+
if (compare_size != size()) {
274+
return false;
275+
}
276+
if (compare_size == 0) {
277+
return true;
278+
}
271279
int32_t compare = memcmp(c_str(), str, size() * sizeof(CHAR_TYPE));
272280
if (compare != 0) {
273281
return false;
@@ -281,6 +289,9 @@ namespace bq {
281289
if (size() != str.size()) {
282290
return false;
283291
}
292+
if (size() == 0) {
293+
return true;
294+
}
284295
return (memcmp(c_str(), str.c_str(), size() * sizeof(CHAR_TYPE)) == 0);
285296
}
286297

Binary file not shown.

0 commit comments

Comments
 (0)