--- kiki_src.orig/kiki/src/bots/KikiPlayback.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kiki/src/bots/KikiPlayback.cpp 2008-09-28 03:34:20 +0500 @@ -76,8 +76,8 @@ void KikiPlayback::start (const std::str Controller.world->setCameraMode (atoi ((*iter).substr ((*iter).find (":") + 2).c_str())); iter++; - unsigned int open = (*iter).find("[")+1; - unsigned int close = (*iter).find("]"); + std::string::size_type open = (*iter).find("[")+1; + std::string::size_type close = (*iter).find("]"); std::vector values = kStringGetComponents ((*iter).substr(open, close-open), " "); KikiPos pos (atoi(values[0].c_str()), atoi(values[1].c_str()), atoi(values[2].c_str())); --- kiki_src.orig/kiki/src/gui/KikiMenu.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kiki/src/gui/KikiMenu.cpp 2008-09-28 03:10:43 +0500 @@ -69,7 +69,7 @@ KikiMenuItem * KikiMenu::newItem ( const { std::string item_text (itemText); std::string event_name (itemText); - unsigned int pos; + std::string::size_type pos; float scale_factor = 1.0; KikiMenuItem * menu_item = new KikiMenuItem (); --- kiki_src.orig/kiki/src/gui/KikiTextLine.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kiki/src/gui/KikiTextLine.cpp 2008-09-28 04:37:25 +0500 @@ -46,7 +46,7 @@ void KikiTextLine::addCharacter ( char c void KikiTextLine::setText ( const std::string & str ) { text = str; - unsigned int pos; + std::string::size_type pos; if ((pos = text.find ("$scale(")) != std::string::npos) { --- kiki_src.orig/kodilib/src/tools/KFileTools.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kodilib/src/tools/KFileTools.cpp 2008-09-28 03:20:18 +0500 @@ -117,8 +117,8 @@ std::string kFileAbsPathName ( const std // -------------------------------------------------------------------------------------------------------- std::string kFileSuffix ( const std::string & path ) { - unsigned int lastDotPos = path.rfind("."); - unsigned int lastSlashPos = path.rfind("/"); + std::string::size_type lastDotPos = path.rfind("."); + std::string::size_type lastSlashPos = path.rfind("/"); if (lastDotPos < path.size() - 1 && (lastDotPos > lastSlashPos || lastSlashPos == std::string::npos)) { @@ -130,7 +130,7 @@ std::string kFileSuffix ( const std::str // -------------------------------------------------------------------------------------------------------- std::string kFileDirName ( const std::string & path ) { - unsigned int lastSlashPos = path.rfind("/"); + std::string::size_type lastSlashPos = path.rfind("/"); if (lastSlashPos < path.size()) { return path.substr(0, lastSlashPos+1); @@ -142,7 +142,7 @@ std::string kFileDirName ( const std::st std::string kFileBaseName ( const std::string & path, bool removeSuffix ) { std::string baseName = path; - unsigned int lastSlashPos = path.rfind("/"); + std::string::size_type lastSlashPos = path.rfind("/"); if (lastSlashPos < path.size() - 1) { baseName = path.substr(lastSlashPos+1); --- kiki_src.orig/kodilib/src/tools/KKeyTools.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kodilib/src/tools/KKeyTools.cpp 2008-09-28 04:37:56 +0500 @@ -170,7 +170,7 @@ int kKeyGetDisplayWidthForModifier ( con // -------------------------------------------------------------------------------------------------------- int kKeyGetDisplayWidthForKey ( const std::string & keyName ) { - unsigned int keyPos = keyName.find('_', 0); + std::string::size_type keyPos = keyName.find('_', 0); if (keyPos == std::string::npos) { return kKeyGetDisplayWidthForPureKey(keyName) + KDL_MOD_KEY_SPACING; @@ -313,7 +313,7 @@ int kKeyDisplayPureKey ( const std::stri int kKeyDisplayKey ( const std::string & keyName, const KPosition & pos ) { KPosition start = pos; - unsigned int keyPos = keyName.find('_', 0); + std::string::size_type keyPos = keyName.find('_', 0); if (keyPos == std::string::npos) { return start.x + kKeyDisplayPureKey(keyName, start) + KDL_MOD_KEY_SPACING; @@ -380,7 +380,7 @@ SDLMod kKeyGetModForModName ( const std: // -------------------------------------------------------------------------------------------------------- SDL_keysym kKeyGetKeysymForKeyName ( const std::string & keyName ) { - unsigned int pos = keyName.find('_'); + std::string::size_type pos = keyName.find('_'); std::string modString; std::string symString = keyName; --- kiki_src.orig/kodilib/src/tools/KStringTools.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kodilib/src/tools/KStringTools.cpp 2008-09-28 02:53:05 +0500 @@ -12,7 +12,7 @@ void kStringInsertStringBehindTags ( std::string & str, const std::string & insertString, const std::string & tag ) { - unsigned int oldPos = 0; + std::string::size_type oldPos = 0; while ((oldPos = str.find(tag, oldPos)) != std::string::npos) { oldPos += tag.size(); @@ -34,7 +34,7 @@ std::vector kStringGetCompo std::vector components; unsigned int dividerLength = divider.size(); - unsigned int oldpos = 0, pos; + std::string::size_type oldpos = 0, pos; while ((pos = str.find(divider, oldpos)) != std::string::npos) { @@ -49,7 +49,8 @@ std::vector kStringGetCompo // -------------------------------------------------------------------------------------------------------- void kStringReplace ( std::string & str, const std::string & toReplace, const std::string & replacement ) { - unsigned int pos = 0, chars = toReplace.size(); + std::string::size_type pos = 0; + unsigned int chars = toReplace.size(); while ((pos = str.find(toReplace, pos)) != std::string::npos) { str.replace(pos, chars, replacement); @@ -59,11 +60,11 @@ void kStringReplace ( std::string & str, // -------------------------------------------------------------------------------------------------------- void kStringReplaceTabs ( std::string & str, unsigned int tabWidth ) { - unsigned int tabPos; + std::string::size_type tabPos; while ((tabPos = str.find('\t')) != std::string::npos) { - unsigned int lastNewlinePos = str.rfind('\n', tabPos-1); - unsigned int relPos = (lastNewlinePos == std::string::npos) ? tabPos : tabPos - lastNewlinePos; + std::string::size_type lastNewlinePos = str.rfind('\n', tabPos-1); + std::string::size_type relPos = (lastNewlinePos == std::string::npos) ? tabPos : tabPos - lastNewlinePos; str.replace(tabPos, 1, std::string(tabWidth-(relPos % tabWidth), ' ')); } } @@ -111,9 +112,9 @@ unsigned int kStringCountChars ( const s } // -------------------------------------------------------------------------------------------------------- -unsigned int kStringNthCharPos ( const std::string & str, unsigned int n, char c ) +std::string::size_type kStringNthCharPos ( const std::string & str, unsigned int n, char c ) { - unsigned int loc = n, oloc = 0; + std::string::size_type loc = n, oloc = 0; while (n > 0 && (loc = str.find(c, oloc)) != std::string::npos) { n--; @@ -129,7 +130,7 @@ void kStringCropRows ( std::string & str unsigned int lines = kStringRows(str); if (lines > rows) { - unsigned int loc = kStringNthCharPos(str, (lines-rows), '\n'); + std::string::size_type loc = kStringNthCharPos(str, (lines-rows), '\n'); str.erase(0, loc+1); } } @@ -137,7 +138,7 @@ void kStringCropRows ( std::string & str // -------------------------------------------------------------------------------------------------------- void kStringCropCols ( std::string & str, unsigned int columns ) { - unsigned int oloc = 0, nloc = 0; + std::string::size_type oloc = 0, nloc = 0; while ((nloc = str.find('\n', oloc)) != std::string::npos) { if ((nloc - oloc) > columns) @@ -159,10 +160,10 @@ void kStringCropCols ( std::string & str unsigned int kStringCols ( const std::string & str ) { if (str.size() == 0) return 0; - int oloc = 0, nloc; + std::string::size_type oloc = 0, nloc; std::string substring; int maxlength = 0, length; - while ((nloc = str.find('\n', oloc)) != (int)std::string::npos) + while ((nloc = str.find('\n', oloc)) != std::string::npos) { substring = str.substr(oloc, nloc - oloc); length = substring.size(); @@ -180,7 +181,8 @@ unsigned int kStringCols ( const std::st unsigned int kStringRows ( const std::string & str ) { if (str.size() == 0) return 1; - unsigned int loc = 0, lines = 0; + std::string::size_type loc = 0; + unsigned int lines = 0; while ((loc = str.find('\n', loc)) != std::string::npos) { lines++; loc++; } if (str[str.size()-1] == '\n') return lines; return lines+1; @@ -203,8 +205,8 @@ std::string kStringPrintf ( const std::s { static char str[256]; std::string format(fmt), subformat, text; - unsigned int oloc = 0; - unsigned int nloc = 0; + std::string::size_type oloc = 0; + std::string::size_type nloc = 0; kStringReplaceTabs(format); @@ -259,7 +261,7 @@ std::string kStringPrintf ( const char * // -------------------------------------------------------------------------------------------------------- bool kStringHasSuffix ( const std::string & str, const std::string & suffix ) { - unsigned int result = str.rfind(suffix); + std::string::size_type result = str.rfind(suffix); if (result == std::string::npos) return false; return (result == str.size()-suffix.size()); } --- kiki_src.orig/kodilib/src/tools/KStringTools.h 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kodilib/src/tools/KStringTools.h 2008-09-28 02:54:44 +0500 @@ -23,7 +23,7 @@ void kStringReplaceTabs ( std::string std::string kStringGetSharedPrefix ( const std::vector & ); void kStringCropCols ( std::string & , unsigned int ); void kStringCropRows ( std::string & , unsigned int ); -unsigned int kStringNthCharPos ( const std::string & , unsigned int, char ); +std::string::size_type kStringNthCharPos ( const std::string & , unsigned int, char ); unsigned int kStringRows ( const std::string & ); unsigned int kStringCols ( const std::string & ); unsigned int kStringWidth ( const std::string & , bool = true); --- kiki_src.orig/kodilib/src/tools/KXMLTools.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kodilib/src/tools/KXMLTools.cpp 2008-09-28 03:22:20 +0500 @@ -57,11 +57,11 @@ std::string kXMLPrintf ( int depth, cons std::string kXMLParseToTagsInVector ( std::string & xml, const std::vector & tags ) { std::string open("<"); - unsigned int minLoc = std::string::npos; + std::string::size_type minLoc = std::string::npos; std::vector::const_iterator iter = tags.begin(); while (iter != tags.end()) { - unsigned int loc = xml.find(open+(*iter)); + std::string::size_type loc = xml.find(open+(*iter)); if (loc < minLoc) minLoc = loc; iter++; } @@ -76,7 +76,7 @@ std::string kXMLReadNamedAttribute ( con std::string value; std::string nameStr(name); nameStr += "='"; - unsigned int loc = xml.find(nameStr); + std::string::size_type loc = xml.find(nameStr); if (loc != std::string::npos) { loc += nameStr.size(); @@ -89,7 +89,7 @@ std::string kXMLReadNamedAttribute ( con // -------------------------------------------------------------------------------------------------------- bool kXMLParseNamedCloseTag ( std::string & xml, const std::string & name, bool printError ) { - unsigned int loc = xml.find('<'); + std::string::size_type loc = xml.find('<'); if (loc == std::string::npos) { if (printError) KConsole::printError(kStringPrintf("invalid XML:\nmissing close tag '%s'", @@ -116,7 +116,7 @@ bool kXMLParseNamedCloseTag ( std::strin // -------------------------------------------------------------------------------------------------------- bool kXMLReadNamedOpenTag ( const std::string & xml, const std::string & name, std::string * attributes ) { - unsigned int loc = xml.find('<'), endloc; + std::string::size_type loc = xml.find('<'), endloc; if (loc == std::string::npos || xml[loc+1] == '/') return false; @@ -139,7 +139,7 @@ bool kXMLReadNamedOpenTag ( const std::s // -------------------------------------------------------------------------------------------------------- std::string kXMLParseNamedOpenTag ( std::string & xml, const std::string & name, std::string * attributes, bool printError ) { - unsigned int loc = xml.find('<'); + std::string::size_type loc = xml.find('<'); if (loc == std::string::npos || xml[loc+1] == '/') { if (printError) KConsole::printError(kStringPrintf("invalid XML:\nmissing tag '%s'", name.c_str())); @@ -190,7 +190,7 @@ std::string kXMLParseNamedOpenTag ( std: // -------------------------------------------------------------------------------------------------------- bool kXMLParseOpenTag ( std::string & xml, std::string & name, std::string * attributes, bool printError ) { - unsigned int loc = xml.find('<'); + std::string::size_type loc = xml.find('<'); if (loc == std::string::npos || xml[loc+1] == '/') { if (printError) KConsole::printError("invalid XML:\nmissing open tag"); @@ -294,7 +294,7 @@ std::string kXMLValue( const std::string // -------------------------------------------------------------------------------------------------------- bool kXMLParseValue( std::string & xml, const std::string & name, int type, void * value, bool printError ) { - unsigned int loc = xml.find('<'); + std::string::size_type loc = xml.find('<'); if (loc == std::string::npos || xml[loc+1] == '/') { if (printError) KConsole::printError(kStringPrintf("invalid XML:\nmissing value '%s'", name.c_str())); @@ -378,8 +378,8 @@ bool kXMLParseValue( std::string & xml, } else if (typeString == "string") { - unsigned int first = substring.find("\"")+1; - unsigned int last = substring.rfind("\"", std::string::npos); + std::string::size_type first = substring.find("\"")+1; + std::string::size_type last = substring.rfind("\"", std::string::npos); *((std::string*)value) = substring.substr(first, last-first); } --- kiki_src.orig/kodilib/src/types/KKey.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kodilib/src/types/KKey.cpp 2008-09-28 03:22:56 +0500 @@ -31,7 +31,7 @@ KKey::KKey ( std::string keyName ) // -------------------------------------------------------------------------------------------------------- std::string KKey::getUnmodifiedName () const { - unsigned int keyPos = name.find('_', 0); + std::string::size_type keyPos = name.find('_', 0); if (keyPos == std::string::npos) { return name; @@ -42,7 +42,7 @@ std::string KKey::getUnmodifiedName () c // -------------------------------------------------------------------------------------------------------- std::string KKey::getModifierName () const { - unsigned int keyPos = name.find('_', 0); + std::string::size_type keyPos = name.find('_', 0); if (keyPos == std::string::npos) { return ""; --- kiki_src.orig/kodilib/src/widgets/KFileNameField.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kodilib/src/widgets/KFileNameField.cpp 2008-09-28 03:37:49 +0500 @@ -41,7 +41,7 @@ bool KFileNameField::handleKey ( const K std::string restPath; // path behind cursor // map cropped path to current directory and rest path to file prefix - unsigned int lastSlashPos = croppedPath.rfind("/"); + std::string::size_type lastSlashPos = croppedPath.rfind("/"); if (lastSlashPos < croppedPath.size()-1) { restPath = croppedPath.substr(lastSlashPos+1); @@ -223,7 +223,7 @@ bool KFileNameField::handleKey ( const K // -------------------------------------------------------------------------------------------------------- void KFileNameField::selectLastPathComponent () { - unsigned int lastSlashPos = text.rfind("/"); + std::string::size_type lastSlashPos = text.rfind("/"); if (lastSlashPos == text.size()-1) lastSlashPos = text.rfind("/", lastSlashPos-1); if (lastSlashPos < text.size()) cursor_pos = lastSlashPos+1; else cursor_pos = 0; --- kiki_src.orig/kodilib/src/widgets/KFileTreeNode.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kodilib/src/widgets/KFileTreeNode.cpp 2008-09-28 03:41:25 +0500 @@ -46,7 +46,7 @@ KFileTreeNode * KFileTreeNode::getRootNo // -------------------------------------------------------------------------------------------------------- std::string KFileTreeNode::getSuffix () const { - unsigned int pos = name.rfind('.'); + std::string::size_type pos = name.rfind('.'); if (pos < name.size()) { return name.substr(pos+1); --- kiki_src.orig/kodilib/src/widgets/KTextField.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kodilib/src/widgets/KTextField.cpp 2008-09-28 03:46:13 +0500 @@ -259,7 +259,7 @@ bool KTextField::handleKey ( const KKey std::string KTextField::getSelection () const { if (cursor_pos == selection_pos) return ""; - unsigned int start = kMin(cursor_pos, selection_pos); + std::string::size_type start = kMin(cursor_pos, selection_pos); return text.substr (start, kMax(cursor_pos, selection_pos)-start); } --- kiki_src.orig/kodilib/src/widgets/KTextWidget.cpp 2008-02-01 22:20:51 +0400 +++ kiki_src.orig/kodilib/src/widgets/KTextWidget.cpp 2008-09-28 03:35:55 +0500 @@ -26,8 +26,8 @@ void KTextWidget::setLabelText () int lineIndex = kStringRows(full_text) - getTextRows(); if ((int)current_row < lineIndex) lineIndex = current_row; lineIndex = kMax(lineIndex, 0); - unsigned int startPos = lineIndex ? kStringNthCharPos(full_text, lineIndex, '\n')+1 : 0; - unsigned int endPos = kStringNthCharPos(full_text, lineIndex + getTextRows(), '\n')+1; + std::string::size_type startPos = lineIndex ? kStringNthCharPos(full_text, lineIndex, '\n')+1 : 0; + std::string::size_type endPos = kStringNthCharPos(full_text, lineIndex + getTextRows(), '\n')+1; setText(full_text.substr(startPos, (endPos - startPos))); }