Skip to content

Commit

Permalink
Merge pull request #2919 from yebblies/impbool
Browse files Browse the repository at this point in the history
Remove implicit conversions from array to bool
  • Loading branch information
monarchdodra committed Jan 27, 2015
2 parents 98acfe9 + 6af3fb5 commit a5de927
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions std/datetime.d
Expand Up @@ -26372,13 +26372,15 @@ auto tz = TimeZone.getTimeZone("America/Los_Angeles");
else version(Windows)
{
import std.format : format;
if(auto windowsTZName = tzDatabaseNameToWindowsTZName(name))
auto windowsTZName = tzDatabaseNameToWindowsTZName(name);
if(windowsTZName != null)
{
try
return WindowsTimeZone.getTimeZone(windowsTZName);
catch(DateTimeException dte)
{
if(auto oldName = _getOldName(windowsTZName))
auto oldName = _getOldName(windowsTZName);
if(oldName != null)
return WindowsTimeZone.getTimeZone(oldName);
throw dte;
}
Expand Down
4 changes: 2 additions & 2 deletions std/mmfile.d
Expand Up @@ -221,7 +221,7 @@ class MmFile
assert(0);
}

if (filename)
if (filename != null)
{
hFile = CreateFileW(filename.tempCStringW(),
dwDesiredAccess2,
Expand All @@ -242,7 +242,7 @@ class MmFile
wenforce(hFileMap, "CreateFileMapping");
scope(failure) CloseHandle(hFileMap);

if (size == 0 && filename)
if (size == 0 && filename != null)
{
uint sizehi;
uint sizelow = GetFileSize(hFile, &sizehi);
Expand Down
2 changes: 1 addition & 1 deletion std/windows/syserror.d
Expand Up @@ -127,7 +127,7 @@ class WindowsException : Exception

auto buf = appender!string();

if (str)
if (str != null)
{
buf.put(str);
buf.put(": ");
Expand Down

0 comments on commit a5de927

Please sign in to comment.