From ca798bc6fbd77e69ef5781d6ade963bcb7388617 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 21 Jul 2003 04:49:46 +0000 Subject: Converted some ints to size_t for 64 bit safety. --- src/LexAda.cxx | 8 ++++---- src/XPM.cxx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/LexAda.cxx b/src/LexAda.cxx index 263f7da45..2e5f891b4 100644 --- a/src/LexAda.cxx +++ b/src/LexAda.cxx @@ -321,7 +321,7 @@ static bool IsValidIdentifier(const SString& identifier) { // First character can't be '_', so initialize the flag to true bool lastWasUnderscore = true; - int length = identifier.length(); + size_t length = identifier.length(); // Zero-length identifiers are not valid (these can occur inside labels) if (length == 0) { @@ -334,7 +334,7 @@ static bool IsValidIdentifier(const SString& identifier) { } // Check for only valid characters and no double underscores - for (int i = 0; i < length; i++) { + for (size_t i = 0; i < length; i++) { if (!IsWordCharacter(identifier[i]) || (identifier[i] == '_' && lastWasUnderscore)) { return false; @@ -355,8 +355,8 @@ static bool IsValidNumber(const SString& number) { int hashPos = number.search("#"); bool seenDot = false; - int i = 0; - int length = number.length(); + size_t i = 0; + size_t length = number.length(); if (length == 0) return false; // Just in case diff --git a/src/XPM.cxx b/src/XPM.cxx index 5758b7810..c3f66c2e4 100644 --- a/src/XPM.cxx +++ b/src/XPM.cxx @@ -102,7 +102,7 @@ void XPM::Init(const char * const *linesForm) { int strings = 1+height+nColours; lines = new char *[strings]; - int allocation = 0; + size_t allocation = 0; for (int i=0; i