Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit 6c8c459

Browse files
committed
Fix signed/unsigned warnings in clean_text.cc and find_links.cc examples.
1 parent ad656bf commit 6c8c459

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/clean_text.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static std::string cleantext(GumboNode* node) {
3131
node->v.element.tag != GUMBO_TAG_STYLE) {
3232
std::string contents = "";
3333
GumboVector* children = &node->v.element.children;
34-
for (int i = 0; i < children->length; ++i) {
34+
for (unsigned int i = 0; i < children->length; ++i) {
3535
const std::string text = cleantext((GumboNode*) children->data[i]);
3636
if (i != 0 && !text.empty()) {
3737
contents.append(" ");

examples/find_links.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static void search_for_links(GumboNode* node) {
3535
}
3636

3737
GumboVector* children = &node->v.element.children;
38-
for (int i = 0; i < children->length; ++i) {
38+
for (unsigned int i = 0; i < children->length; ++i) {
3939
search_for_links(static_cast<GumboNode*>(children->data[i]));
4040
}
4141
}

0 commit comments

Comments
 (0)