diff options
author | John Fultz <jfultz@wolfram.com> | 2019-07-21 02:06:00 -0500 |
---|---|---|
committer | John Fultz <jfultz@wolfram.com> | 2019-07-21 02:06:00 -0500 |
commit | b67605814738d17484e508d037b8b1f09c27cab6 (patch) | |
tree | 9584efaa02ac17a1e0dd91b9b36797441c3cf593 /quackleio/gaddagfactory.cpp | |
parent | 592be355923ea0fae3630af6fe3ba8f11523d9e4 (diff) |
Visual C++ compiler warning fixes.
Mostly signed/unsigned/size_t mismatches, except for one
case treating a bool as an integer.
Diffstat (limited to 'quackleio/gaddagfactory.cpp')
-rw-r--r-- | quackleio/gaddagfactory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/quackleio/gaddagfactory.cpp b/quackleio/gaddagfactory.cpp index bd5d67a..5d20d38 100644 --- a/quackleio/gaddagfactory.cpp +++ b/quackleio/gaddagfactory.cpp @@ -120,7 +120,7 @@ void GaddagFactory::writeIndex(const string &fname) out.put(1); // GADDAG format version 1 out.write(m_hash.charptr, sizeof(m_hash.charptr)); - for (size_t i = 0; i < m_nodelist.size(); i++) + for (unsigned int i = 0; i < m_nodelist.size(); i++) { unsigned int p = (unsigned int)(m_nodelist[i]->pointer); if (p != 0) @@ -152,7 +152,7 @@ void GaddagFactory::Node::print(vector< Node* >& nodelist) { if (children.size() > 0) { - pointer = nodelist.size(); + pointer = (int)nodelist.size(); children[children.size() - 1].lastchild = true; } @@ -180,7 +180,7 @@ void GaddagFactory::Node::pushWord(const Quackle::LetterString& word) { if (children[i].c == first) { - index = i; + index = (int)i; i = children.size(); } } @@ -193,7 +193,7 @@ void GaddagFactory::Node::pushWord(const Quackle::LetterString& word) n.pointer = 0; n.lastchild = false; children.push_back(n); - index = children.size() - 1; + index = (int)children.size() - 1; } children[index].pushWord(rest); |