mirror of
https://github.com/dlang/dmd.git
synced 2025-04-29 14:40:12 +03:00
Fix dip1000 errors in blake3.d
This commit is contained in:
parent
57c2d8a694
commit
59f37858bf
2 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,6 @@ nothrow:
|
||||||
* data = byte array to hash
|
* data = byte array to hash
|
||||||
* Returns: Blake 3 hash of data
|
* Returns: Blake 3 hash of data
|
||||||
**/
|
**/
|
||||||
@trusted
|
|
||||||
public ubyte[32] blake3(scope const ubyte[] data)
|
public ubyte[32] blake3(scope const ubyte[] data)
|
||||||
{
|
{
|
||||||
ChunkState state;
|
ChunkState state;
|
||||||
|
@ -210,7 +209,7 @@ uint[16] compress(const ref uint[8] chainingValue, const ref uint[16] blockWords
|
||||||
|
|
||||||
//if block isn't full, only the first blockLength/4 words
|
//if block isn't full, only the first blockLength/4 words
|
||||||
//will be filled in
|
//will be filled in
|
||||||
uint[16] bytesToWords(const ubyte[] block)
|
uint[16] bytesToWords(scope const ubyte[] block)
|
||||||
{
|
{
|
||||||
uint[16] ret = 0;
|
uint[16] ret = 0;
|
||||||
foreach(i; 0 .. (block.length/4))
|
foreach(i; 0 .. (block.length/4))
|
||||||
|
@ -225,7 +224,7 @@ uint[16] bytesToWords(const ubyte[] block)
|
||||||
|
|
||||||
|
|
||||||
//full sized chunks, so no need to check for partial blocks, etc
|
//full sized chunks, so no need to check for partial blocks, etc
|
||||||
void updateChunkStateFull(ref ChunkState chunkState, const ubyte[] chunk)
|
void updateChunkStateFull(ref ChunkState chunkState, scope const ubyte[] chunk)
|
||||||
{
|
{
|
||||||
for (size_t cursor = 0; cursor < ChunkLength; cursor += BlockLength)
|
for (size_t cursor = 0; cursor < ChunkLength; cursor += BlockLength)
|
||||||
{
|
{
|
||||||
|
|
1
dub.sdl
1
dub.sdl
|
@ -15,6 +15,7 @@ subPackage {
|
||||||
importPaths "compiler/src"
|
importPaths "compiler/src"
|
||||||
stringImportPaths "compiler/src/dmd/res" "."
|
stringImportPaths "compiler/src/dmd/res" "."
|
||||||
dflags "-L/STACK:16777216" platform="windows"
|
dflags "-L/STACK:16777216" platform="windows"
|
||||||
|
dflags "-preview=dip1000"
|
||||||
preGenerateCommands "echo -n /etc > SYSCONFDIR.imp" platform="posix"
|
preGenerateCommands "echo -n /etc > SYSCONFDIR.imp" platform="posix"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue