summaryrefslogtreecommitdiffstats
path: root/courgette/adjustment_method_2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'courgette/adjustment_method_2.cc')
-rw-r--r--courgette/adjustment_method_2.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/courgette/adjustment_method_2.cc b/courgette/adjustment_method_2.cc
index 49fcf49..9cb9dbd 100644
--- a/courgette/adjustment_method_2.cc
+++ b/courgette/adjustment_method_2.cc
@@ -15,6 +15,7 @@
#include <iostream>
#include "base/basictypes.h"
+#include "base/format_macros.h"
#include "base/logging.h"
#include "base/string_util.h"
@@ -461,8 +462,8 @@ std::string ToString(const Shingle* instance) {
s += ToString(instance->at(i));
sep = ", ";
}
- StringAppendF(&s, ">(%u)@{%d}", instance->exemplar_position_,
- static_cast<int>(instance->position_count()));
+ StringAppendF(&s, ">(%" PRIuS ")@{%" PRIuS "}", instance->exemplar_position_,
+ instance->position_count());
return s;
}
@@ -578,7 +579,7 @@ std::string HistogramToString(const ShinglePattern::Histogram& histogram,
s += " ...";
break;
}
- StringAppendF(&s, " %d", p->count());
+ StringAppendF(&s, " %" PRIuS, p->count());
}
return s;
}
@@ -598,7 +599,7 @@ std::string HistogramToStringFull(const ShinglePattern::Histogram& histogram,
s += "...\n";
break;
}
- StringAppendF(&s, "(%d) ", p->count());
+ StringAppendF(&s, "(%" PRIuS ") ", p->count());
s += ToString(&(*p->instance()));
s += "\n";
}
@@ -633,9 +634,9 @@ std::string ShinglePatternToStringFull(const ShinglePattern* pattern,
s += "\n";
size_t model_size = pattern->model_histogram_.size();
size_t program_size = pattern->program_histogram_.size();
- StringAppendF(&s, " model shingles %u\n", model_size);
+ StringAppendF(&s, " model shingles %" PRIuS "\n", model_size);
s += HistogramToStringFull(pattern->model_histogram_, " ", max);
- StringAppendF(&s, " program shingles %u\n", program_size);
+ StringAppendF(&s, " program shingles %" PRIuS "\n", program_size);
s += HistogramToStringFull(pattern->program_histogram_, " ", max);
return s;
}