From 3a5621c2aa3931be608508d4fadc42c2a09cb251 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 12 Dec 2012 16:35:55 +0100 Subject: Trivial 64-bit warning fixes. --- src/text.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/text.cpp') diff --git a/src/text.cpp b/src/text.cpp index 91b81e1b..0fda458a 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -159,19 +159,19 @@ void text::appendWord(ref w) } -void text::insertWordBefore(const int pos, ref w) +void text::insertWordBefore(const size_t pos, ref w) { m_words.insert(m_words.begin() + pos, w); } -void text::insertWordAfter(const int pos, ref w) +void text::insertWordAfter(const size_t pos, ref w) { m_words.insert(m_words.begin() + pos + 1, w); } -void text::removeWord(const int pos) +void text::removeWord(const size_t pos) { const std::vector >::iterator it = m_words.begin() + pos; @@ -185,7 +185,7 @@ void text::removeAllWords() } -int text::getWordCount() const +size_t text::getWordCount() const { return (m_words.size()); } @@ -197,13 +197,13 @@ bool text::isEmpty() const } -const ref text::getWordAt(const int pos) +const ref text::getWordAt(const size_t pos) { return (m_words[pos]); } -const ref text::getWordAt(const int pos) const +const ref text::getWordAt(const size_t pos) const { return (m_words[pos]); } @@ -354,7 +354,7 @@ void text::encodeAndFold(utility::outputStream& os, const string::size_type maxL string::size_type curLineLength = firstLineOffset; word::generatorState state; - for (int wi = 0 ; wi < getWordCount() ; ++wi) + for (size_t wi = 0 ; wi < getWordCount() ; ++wi) { getWordAt(wi)->generate(os, maxLineLength, curLineLength, &curLineLength, flags, &state); -- cgit v1.2.3