summaryrefslogtreecommitdiff
path: root/utils/alignment_io.cc
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-05-31 13:57:24 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-05-31 13:57:24 +0200
commitf1ba05780db1705493d9afb562332498b93d26f1 (patch)
treefb429a657ba97f33e8140742de9bc74d9fc88e75 /utils/alignment_io.cc
parentaadabfdf37dfd451485277cb77fad02f77b361c6 (diff)
parent317d650f6cb1e24ac6f3be6f7bf9d4246a59e0e5 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'utils/alignment_io.cc')
-rw-r--r--utils/alignment_io.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/alignment_io.cc b/utils/alignment_io.cc
index 1d923f7f..460fbd3f 100644
--- a/utils/alignment_io.cc
+++ b/utils/alignment_io.cc
@@ -7,7 +7,7 @@ static bool is_digit(char x) { return x >= '0' && x <= '9'; }
boost::shared_ptr<Array2D<bool> > AlignmentIO::ReadPharaohAlignmentGrid(const string& al) {
int max_x = 0;
int max_y = 0;
- int i = 0;
+ unsigned i = 0;
size_t pos = al.rfind(" ||| ");
if (pos != string::npos) { i = pos + 5; }
while (i < al.size()) {
@@ -65,8 +65,8 @@ boost::shared_ptr<Array2D<bool> > AlignmentIO::ReadPharaohAlignmentGrid(const st
void AlignmentIO::SerializePharaohFormat(const Array2D<bool>& alignment, ostream* o) {
ostream& out = *o;
bool need_space = false;
- for (int i = 0; i < alignment.width(); ++i)
- for (int j = 0; j < alignment.height(); ++j)
+ for (unsigned i = 0; i < alignment.width(); ++i)
+ for (unsigned j = 0; j < alignment.height(); ++j)
if (alignment(i,j)) {
if (need_space) out << ' '; else need_space = true;
out << i << '-' << j;
@@ -77,8 +77,8 @@ void AlignmentIO::SerializePharaohFormat(const Array2D<bool>& alignment, ostream
void AlignmentIO::SerializeTypedAlignment(const Array2D<AlignmentType>& alignment, ostream* o) {
ostream& out = *o;
bool need_space = false;
- for (int i = 0; i < alignment.width(); ++i)
- for (int j = 0; j < alignment.height(); ++j) {
+ for (unsigned i = 0; i < alignment.width(); ++i)
+ for (unsigned j = 0; j < alignment.height(); ++j) {
const AlignmentType& aij = alignment(i,j);
if (aij != kNONE) {
if (need_space) out << ' '; else need_space = true;