Skip to content

Commit

Permalink
more const correct
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Feb 17, 2012
1 parent 931f89f commit 786284e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion std/stream.d
Expand Up @@ -1330,7 +1330,7 @@ class Stream : InputStream, OutputStream {
* Get a hash of the stream by reading each byte and using it in a CRC-32
* checksum.
*/
override size_t toHash() {
override size_t toHash() @trusted {
if (!readable || !seekable)
return super.toHash();
ulong pos = position;
Expand Down
4 changes: 2 additions & 2 deletions std/xml.d
Expand Up @@ -628,7 +628,7 @@ class Document : Element
* You should rarely need to call this function. It exists so that
* Documents can be used as associative array keys.
*/
override hash_t toHash()
override hash_t toHash() @trusted
{
return hash(prolog, hash(epilog, (cast()super).toHash()));
}
Expand Down Expand Up @@ -2843,7 +2843,7 @@ private
s = s[1..$];
}

hash_t hash(string s,hash_t h=0)
hash_t hash(string s,hash_t h=0) @trusted
{
return typeid(s).getHash(&s) + h;
}
Expand Down

0 comments on commit 786284e

Please sign in to comment.