diff --git a/dyaml/node.d b/dyaml/node.d index b38f182..7c12ed9 100644 --- a/dyaml/node.d +++ b/dyaml/node.d @@ -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; diff --git a/dyaml/reader.d b/dyaml/reader.d index 21fb407..17cda41 100644 --- a/dyaml/reader.d +++ b/dyaml/reader.d @@ -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.