0003-fix-compile-errors-and-warnings-when-sizeof-size_t.patch

fix compile errors and warnings when sizeof(size_t) != sizeof(uint) - Spex, 02/24/2009 11:28 pm

Download (4.2 kB)

b/nel/include/nel/misc/polygon.h
221 221
	const CVector2f &getSegRef1(uint index) const
222 222
	{
223 223
		nlassert(index < Vertices.size());
224
		return index == Vertices.size() - 1 ?
224
		return index + 1 == Vertices.size() ?
225 225
			   Vertices[0]                 :
226 226
		       Vertices[index + 1];
227 227
	}
b/nel/include/nel/sound/u_audio_mixer.h
179 179
	 *	for the HighestPri source.
180 180
	 *	By default, reserve are set for each channel to the number of available tracks.
181 181
	 */
182
	virtual void		setPriorityReserve(TSoundPriority priorityChannel, uint reserve) = 0;
182
	virtual void		setPriorityReserve(TSoundPriority priorityChannel, size_t reserve) = 0;
183 183
	/** Set the Low water mark.
184 184
	 *	This value is use to mute sound source that try to play when their priority
185 185
	 *	channel is full (see setPriorityReserve).
......
192 192
	 *	available tracks (which is almost always the case). But this value will help
193 193
	 *	the mixer make its best.
194 194
	 */
195
	virtual void		setLowWaterMark(uint value) = 0;
195
	virtual void		setLowWaterMark(size_t value) = 0;
196 196
	/** Change the number of tracks in RealTime. If the number is lowered, random tracks are deleted.
197 197
	 *	Any playing sources of such deleted track will be stopped
198 198
	 */
b/nel/src/3d/zone.cpp
1418 1418
void			CZone::debugBinds(FILE *f)
1419 1419
{
1420 1420
	fprintf(f, "*****************************\n");
1421
	fprintf(f, "ZoneId: %d. NPatchs:%d\n", ZoneId, PatchConnects.size());
1421
	fprintf(f, "ZoneId: %d. NPatchs:%zu\n", ZoneId, PatchConnects.size());
1422 1422
	sint i;
1423 1423
	for(i=0;i<(sint)PatchConnects.size();i++)
1424 1424
	{
b/nel/src/sound/audio_mixer_user.cpp
181 181
}
182 182

183 183

184
void CAudioMixerUser::setPriorityReserve(TSoundPriority priorityChannel, uint reserve)
184
void CAudioMixerUser::setPriorityReserve(TSoundPriority priorityChannel, size_t reserve)
185 185
{
186 186
	_PriorityReserve[priorityChannel] = min(_Tracks.size(), reserve);
187 187
}
188 188

189
void CAudioMixerUser::setLowWaterMark(uint value)
189
void CAudioMixerUser::setLowWaterMark(size_t value)
190 190
{
191 191
	_LowWaterMark = min(_Tracks.size(), value);
192 192
}
b/nel/src/sound/audio_mixer_user.h
144 144
	 *	for the HighestPri source.
145 145
	 *	By default, reserve are set for each channel to the number of available tracks.
146 146
	 */
147
	virtual void		setPriorityReserve(TSoundPriority priorityChannel, uint reserve);
147
	virtual void		setPriorityReserve(TSoundPriority priorityChannel, size_t reserve);
148 148
	/** Set the Low water mark.
149 149
	 *	This value is use to mute sound source that try to play when there priority
150 150
	 *	channel is full (see setPriorityReserve).
......
157 157
	 *	available tracks (witch is almos alwais the case). But this value will help
158 158
	 *	the mixer make it's best.
159 159
	 */
160
	virtual void		setLowWaterMark(uint value);
160
	virtual void		setLowWaterMark(size_t value);
161 161

162 162
	virtual	void		changeMaxTrack(uint maxTrack);
163 163

164
-