Changeset - r9768:3ae775ddbb05
[Not reviewed]
master
0 1 0
glx - 16 years ago 2008-07-31 22:55:12
glx@openttd.org
(svn r13904) -Fix (r13715): 'cast from/to pointer to/from integer of different size' warnings
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/strings.cpp
Show inline comments
 
@@ -185,13 +185,13 @@ char *InlineString(char *buf, StringID s
 
/** This function is used to "bind" a C string to a OpenTTD dparam slot.
 
 * @param n slot of the string
 
 * @param str string to bind
 
 */
 
void SetDParamStr(uint n, const char *str)
 
{
 
	SetDParam(n, (uint64)str);
 
	SetDParam(n, (uint64)(size_t)str);
 
}
 

	
 
void InjectDParam(int amount)
 
{
 
	memmove(_decode_parameters + amount, _decode_parameters, sizeof(_decode_parameters) - amount * sizeof(uint64));
 
}
 
@@ -294,13 +294,13 @@ static char *FormatTinyDate(char *buff, 
 
	char day[3];
 
	char month[3];
 
	/* We want to zero-pad the days and months */
 
	snprintf(day,   lengthof(day),   "%02i", ymd.day);
 
	snprintf(month, lengthof(month), "%02i", ymd.month + 1);
 

	
 
	int64 args[3] = { (int64)day, (int64)month, ymd.year };
 
	int64 args[3] = { (int64)(size_t)day, (int64)(size_t)month, ymd.year };
 
	return FormatString(buff, GetStringPtr(STR_DATE_TINY), args, 0, last);
 
}
 

	
 
static char *FormatGenericCurrency(char *buff, const CurrencySpec *spec, Money number, bool compact, const char* last)
 
{
 
	/* We are going to make number absolute for printing, so
 
@@ -553,13 +553,13 @@ static char* FormatString(char* buff, co
 

	
 
			case SCC_STRING_ID: // {STRINL}
 
				buff = GetStringWithArgs(buff, Utf8Consume(&str), argv, last);
 
				break;
 

	
 
			case SCC_RAW_STRING_POINTER: { // {RAW_STRING}
 
				const char *str = (const char*)GetInt64(&argv);
 
				const char *str = (const char*)(size_t)GetInt64(&argv);
 
				buff = FormatString(buff, str, argv, casei, last);
 
				break;
 
			}
 

	
 
			case SCC_DATE_LONG: // {DATE_LONG}
 
				buff = FormatYmdString(buff, GetInt32(&argv), last);
0 comments (0 inline, 0 general)