Skip to content

Commit fc56b3b

Browse files
author
lishuangquan
committed
watch: split var name: keep sub string between '<' and '>'
Change-Id: I844a11fb24467a7eb120fdfc07c3f2c5f17a74cf
1 parent 5c72b72 commit fc56b3b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

debug_kit.h

+11
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ inline std::vector<std::string> __split_for_watch(const std::string& s) {
5252
}
5353
continue;
5454
}
55+
if (s[i] == '<') {
56+
int sum = -1;
57+
subs += s[i];
58+
while (sum) {
59+
++i;
60+
subs += s[i];
61+
if (s[i] == '<') --sum;
62+
if (s[i] == '>') ++sum;
63+
}
64+
continue;
65+
}
5566
if (s[i] == ',') {
5667
ret.push_back(subs);
5768
subs.clear();

0 commit comments

Comments
 (0)