Fix issues discovered while evaluating pvs-studio

This commit is contained in:
Jason Turner
2014-05-11 11:53:03 -06:00
parent bcb7172037
commit c35b35e4f8
3 changed files with 13 additions and 13 deletions

View File

@@ -258,7 +258,7 @@ namespace chaiscript
{
std::ostringstream oss;
for (unsigned int j = 0; j < this->children.size(); ++j) {
for (size_t j = 0; j < this->children.size(); ++j) {
oss << this->children[j]->pretty_print();
if (j == 0)
@@ -323,7 +323,7 @@ namespace chaiscript
virtual std::string pretty_print() const
{
std::ostringstream oss;
for (unsigned int j = 0; j < this->children.size(); ++j) {
for (size_t j = 0; j < this->children.size(); ++j) {
oss << this->children[j]->pretty_print();
if (j == 0)
@@ -1248,7 +1248,7 @@ namespace chaiscript
assert(end_point > 0);
end_point = this->children.size() - 1;
}
for (unsigned int i = 1; i < end_point; ++i) {
for (size_t i = 1; i < end_point; ++i) {
chaiscript::eval::detail::Scope_Push_Pop catchscope(t_ss);
AST_NodePtr catch_block = this->children[i];