Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #341 from donc/remove_useless_arraycast
Browse files Browse the repository at this point in the history
Remove a useless and complicated cast
  • Loading branch information
Alex Rønne Petersen committed Oct 31, 2012
2 parents 159b9e3 + aa94d62 commit 4acdd37
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/rt/adi.d
Expand Up @@ -38,12 +38,6 @@ private
}


struct Array
{
size_t length;
void* ptr;
}

/**********************************************
* Reverse array of chars.
* Handled separately because embedded multibyte encodings should not be
Expand Down Expand Up @@ -230,7 +224,7 @@ unittest
extern (C) void[] _adReverse(void[] a, size_t szelem)
out (result)
{
assert(result is *cast(void[]*)(&a));
assert(result is a);
}
body
{
Expand Down Expand Up @@ -269,7 +263,7 @@ body
//gc_free(tmp);
}
}
return *cast(void[]*)(&a);
return a;
}

unittest
Expand Down

0 comments on commit 4acdd37

Please sign in to comment.