Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions std/datetime/timezone.d
Original file line number Diff line number Diff line change
Expand Up @@ -1994,41 +1994,37 @@ public:
}


version(TZDatabaseDir)
version(StdDdoc)
{
import std.string : strip;
/++
The default directory where the TZ Database files are. It's empty
for Windows, since Windows doesn't have them.
The default directory where the TZ Database files are stored. It's
empty for Windows, since Windows doesn't have them. You can also use
the TZDatabaseDir version to pass an arbitrary path at compile-time,
rather than hard-coding it here. Android concatenates all time zone
data into a single file called tzdata and stores it in the directory
below.
+/
enum defaultTZDatabaseDir = "";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First StdDdoc comment I've written, not sure if I need to put this blank enum here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do. You can't document a symbol that isn't there.

}
else version(TZDatabaseDir)
{
import std.string : strip;
enum defaultTZDatabaseDir = strip(import("TZDatabaseDirFile"));
}
else version(Android)
{
// Android concatenates all time zone data into a single file and stores it here.
enum defaultTZDatabaseDir = "/system/usr/share/zoneinfo/";
}
else version(Solaris)
{
/++
The default directory where the TZ Database files are. It's empty
for Windows, since Windows doesn't have them.
+/
enum defaultTZDatabaseDir = "/usr/share/lib/zoneinfo/";
}
else version(Posix)
{
/++
The default directory where the TZ Database files are. It's empty
for Windows, since Windows doesn't have them.
+/
enum defaultTZDatabaseDir = "/usr/share/zoneinfo/";
}
else version(Windows)
{
/++ The default directory where the TZ Database files are. It's empty
for Windows, since Windows doesn't have them.
+/
enum defaultTZDatabaseDir = "";
}

Expand Down
5 changes: 3 additions & 2 deletions std/digest/murmurhash.d
Original file line number Diff line number Diff line change
Expand Up @@ -505,15 +505,16 @@ struct MurmurHash3(uint size /* 32 or 128 */ , uint opt = size_t.sizeof == 8 ? 6
// Buffer should never be full while entering this function.
assert(bufferSize < Element.sizeof);

// Check if we don't fill up a whole block buffer.
// Check if the incoming data doesn't fill up a whole block buffer.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MetaLang, this is for you.

if (bufferSize + data.length < Element.sizeof)
{
buffer.data[bufferSize .. bufferSize + data.length] = data[];
bufferSize += data.length;
return;
}

// Check if we have some leftover data in the buffer. Then fill the first block buffer.
// Check if there's some leftover data in the first block buffer, and
// fill the remaining space first.
if (bufferSize != 0)
{
const bufferLeeway = Element.sizeof - bufferSize;
Expand Down