Subversion Repositories WoWGM

Rev

Rev 14 | Rev 20 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14 Rev 18
Line 134... Line 134...
134
		++string;
134
		++string;
135
	}
135
	}
136
}
136
}
137
 
137
 
138
//===========================================================================
138
//===========================================================================
-
 
139
int SStrToInt(char const* string)
-
 
140
{
-
 
141
	char const* copy = string;
-
 
142
	// TODO: ASSERT(string);
-
 
143
	if (*string == '-') {
-
 
144
		copy = string + 1;
-
 
145
	}
-
 
146
	int result = *copy - 48;
-
 
147
	if (result >= 10) {
-
 
148
		result = 0;
-
 
149
	}
-
 
150
	else
-
 
151
	{
-
 
152
		char const* v4 = (copy + 1);
-
 
153
		for (int i = copy[1] - 48; i < 10; i = *v4 - 48 )
-
 
154
		{
-
 
155
			++v4;
-
 
156
			result = i + 10 * result;
-
 
157
		}
-
 
158
	}
-
 
159
	if ( *string == '-' )
-
 
160
	{
-
 
161
		return -result;
-
 
162
	}
-
 
163
	return result;
-
 
164
}
-
 
165
 
-
 
166
//===========================================================================
139
void SStrUpper(char* string)
167
void SStrUpper(char* string)
140
{
168
{
141
	// TODO: ASSERT(string);
169
	// TODO: ASSERT(string);
142
	while(*string)
170
	while(*string)
143
	{
171
	{