Fixed some compilation bugs on 32bit.

This commit is contained in:
Ferdinand Majerech 2012-01-22 10:37:44 +01:00
parent 01c0ea6cd6
commit 04af9bf240
2 changed files with 3 additions and 3 deletions

View file

@ -1323,7 +1323,7 @@ struct Node
}
//Get index of pair with key (or value, if value is true) matching index.
long findPair(T, bool value = false)(const ref T index) const
size_t findPair(T, bool value = false)(const ref T index) const
{
const pairs = value_.get!(const Pair[])();
const(Node)* node;

View file

@ -312,7 +312,7 @@ final class Reader
}
//Handle an exception thrown in loadChars method of any Reader.
void handleLoadCharsException(Exception e, size_t oldPosition)
void handleLoadCharsException(Exception e, ulong oldPosition)
{
try{throw e;}
catch(UtfException e)
@ -572,7 +572,7 @@ struct UTFBlockDecoder(size_t bufferSize_) if (bufferSize_ % 2 == 0)
{
for(long end = max - 1; end >= 0; --end)
{
const s = utf8Stride[buffer[end]];
const s = utf8Stride[buffer[cast(size_t)end]];
if(s != 0xFF)
{
//If stride goes beyond end of the buffer (max), return end.