summaryrefslogtreecommitdiff
path: root/src/misc/str.hpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-19 20:03:25 +0000
committeryexo <yexo@openttd.org>2010-03-19 20:03:25 +0000
commit1834e0edb5922baea2a29846c4d9237e1e2da51c (patch)
tree2a821bd530576052e77fb6bf13293819b23413ef /src/misc/str.hpp
parent3a790eedd245c12a10624de207db6f896bf600b7 (diff)
downloadopenttd-1834e0edb5922baea2a29846c4d9237e1e2da51c.tar.xz
(svn r19467) -Codechange: Use uint and byte direct instead of declaring internal types (skidd13)
-Codechange: remove now unneeded asserts -Codechange: Set CBlobBaseSimple as absolute base class of CBlobT
Diffstat (limited to 'src/misc/str.hpp')
-rw-r--r--src/misc/str.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc/str.hpp b/src/misc/str.hpp
index 7f65f1958..ac3359829 100644
--- a/src/misc/str.hpp
+++ b/src/misc/str.hpp
@@ -40,7 +40,7 @@ struct CStrA : public CBlobT<char>
}
/** Grow the actual buffer and fix the trailing zero at the end. */
- FORCEINLINE char *GrowSizeNC(bsize_t count)
+ FORCEINLINE char *GrowSizeNC(uint count)
{
char *ret = base::GrowSizeNC(count);
base::FixTail();
@@ -93,14 +93,14 @@ struct CStrA : public CBlobT<char>
/** Add formated string (like vsprintf) at the end of existing contents. */
int AddFormatL(const char *format, va_list args)
{
- bsize_t addSize = max<size_t>(strlen(format), 16);
+ uint addSize = max<uint>(strlen(format), 16);
addSize += addSize / 2;
int ret;
int err = 0;
for (;;) {
char *buf = MakeFreeSpace(addSize);
ret = vsnprintf(buf, base::GetReserve(), format, args);
- if (ret >= base::GetReserve()) {
+ if (ret >= (int)base::GetReserve()) {
/* Greater return than given count means needed buffer size. */
addSize = ret + 1;
continue;