From 1378a5e5f45f5844b905ff86f9822627b5f21180 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 10 Feb 2024 01:20:35 +0100 Subject: [PATCH] Tier1: use SSIZE_MAX for default str slice buf end Will be INT_MAX on 32bit platform and INT64_MAX on 64bit. --- r5dev/public/tier1/utlstring.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/r5dev/public/tier1/utlstring.h b/r5dev/public/tier1/utlstring.h index 354c8ca9..e12e155a 100644 --- a/r5dev/public/tier1/utlstring.h +++ b/r5dev/public/tier1/utlstring.h @@ -14,10 +14,6 @@ #include "tier1/strtools.h" #include "limits.h" -#ifndef SIZE_MAX -#define SIZE_MAX ((size_t) -1) -#endif - //----------------------------------------------------------------------------- // Base class, containing simple memory management //----------------------------------------------------------------------------- @@ -260,7 +256,7 @@ public: // Take a piece out of the string. // If you only specify nStart, it'll go from nStart to the end. // You can use negative numbers and it'll wrap around to the start. - CUtlString Slice( ssize_t nStart=0, ssize_t nEnd=INT_MAX ); + CUtlString Slice( ssize_t nStart=0, ssize_t nEnd=SSIZE_MAX ); // Grab a substring starting from the left or the right side. CUtlString Left( ssize_t nChars );