diff --git a/dub.json b/dub.json index 050dba6c..50051917 100644 --- a/dub.json +++ b/dub.json @@ -50,11 +50,11 @@ "versions-windows": ["Unicode"], "libs-windows": ["opengl32"], "dependencies": { - "derelict-gl3": "~>2.0.0-beta.7", - "derelict-ft": "~>2.0.0-beta.4" + "derelict-gl3": "~>2.0.0-beta.8", + "derelict-ft": "~>2.0.0-beta.5" }, "dependencies-posix": { - "derelict-sdl2": "~>3.0.0-beta.7" + "derelict-sdl2": "~>3.0.0-beta.8" }, "copyFiles-windows-x86_64": [ "libs/windows/x86_64/libfreetype-6.dll" @@ -73,8 +73,8 @@ "versions": ["USE_EXTERNAL"], "libs-windows": ["opengl32"], "dependencies": { - "derelict-gl3": "~>2.0.0-beta.7", - "derelict-ft": "~>2.0.0-beta.4" + "derelict-gl3": "~>2.0.0-beta.8", + "derelict-ft": "~>2.0.0-beta.5" } }, { @@ -84,9 +84,9 @@ "versions-windows": ["Unicode" ,"NO_OPENGL"], "libs-windows": ["opengl32"], "dependencies-posix": { - "derelict-gl3": "~>2.0.0-beta.7", - "derelict-sdl2": "~>3.0.0-beta.7", - "derelict-ft": "~>2.0.0-beta.4" + "derelict-gl3": "~>2.0.0-beta.8", + "derelict-sdl2": "~>3.0.0-beta.8", + "derelict-ft": "~>2.0.0-beta.5" } }, { @@ -94,9 +94,9 @@ "versions": ["USE_SDL", "USE_OPENGL", "USE_FREETYPE", "EmbedStandardResources"], "versions-windows": ["Unicode"], "dependencies": { - "derelict-gl3": "~>2.0.0-beta.7", - "derelict-ft": "~>2.0.0-beta.4", - "derelict-sdl2": "~>3.0.0-beta.7" + "derelict-gl3": "~>2.0.0-beta.8", + "derelict-ft": "~>2.0.0-beta.5", + "derelict-sdl2": "~>3.0.0-beta.8" }, "copyFiles-windows-x86_64": [ "libs/windows/x86_64/libfreetype-6.dll", @@ -112,9 +112,9 @@ "versions": ["USE_X11", "USE_FREETYPE", "EmbedStandardResources"], "versions-windows": ["Unicode"], "dependencies": { - "derelict-gl3": "~>2.0.0-beta.7", - "derelict-ft": "~>2.0.0-beta.4", - "x11": "~>1.0.17" + "derelict-gl3": "~>2.0.0-beta.8", + "derelict-ft": "~>2.0.0-beta.5", + "x11": "~>1.0.21" } }, { diff --git a/src/dlangui/core/settings.d b/src/dlangui/core/settings.d index 6f287fd9..15bb16a8 100644 --- a/src/dlangui/core/settings.d +++ b/src/dlangui/core/settings.d @@ -489,7 +489,7 @@ final class Setting { /// read as string value - @property inout(string) str() inout { + @property string str() { final switch(_type) with(SettingType) { case STRING: return _store.str; @@ -510,7 +510,7 @@ final class Setting { } } /// read as string value - inout(string) strDef(string defValue) inout { + string strDef(string defValue) { final switch(_type) with(SettingType) { case STRING: return _store.str; diff --git a/src/dlangui/dialogs/filedlg.d b/src/dlangui/dialogs/filedlg.d index c3b04465..a3421ff6 100644 --- a/src/dlangui/dialogs/filedlg.d +++ b/src/dlangui/dialogs/filedlg.d @@ -363,19 +363,8 @@ class FileDialog : Dialog, CustomGridCellAdapter { protected string formatTimestamp(ref DirEntry f) { import std.datetime : SysTime; - import std.typecons : Nullable; - Nullable!SysTime ts; - try { - ts = f.timeLastModified; - } catch (Exception e) { - Log.w(e.msg); - } - if (ts.isNull) { - return "----.--.-- --:--"; - } else { - //date = "%04d.%02d.%02d %02d:%02d:%02d".format(ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second); - return "%04d.%02d.%02d %02d:%02d".format(ts.year, ts.month, ts.day, ts.hour, ts.minute); - } + SysTime ts = f.timeLastModified; + return "%04d.%02d.%02d %02d:%02d".format(ts.year, ts.month, ts.day, ts.hour, ts.minute); } protected int entriesToCells(string selectedItemPath) { diff --git a/src/dlangui/dom/cssparser.d b/src/dlangui/dom/cssparser.d index a64c75f0..69f6392d 100644 --- a/src/dlangui/dom/cssparser.d +++ b/src/dlangui/dom/cssparser.d @@ -81,16 +81,16 @@ struct CSSToken { string text; string dimensionUnit; union { + struct { + long intValue = 0; /// for number and dimension + double doubleValue = 0; /// for number and dimension + bool typeFlagInteger; /// for number and dimension - true if number is integer, false if double + } + struct { + uint unicodeRangeStart; /// for unicodeRange (initialized to 0 via intValue=0) + uint unicodeRangeEnd; /// for unicodeRange (initialized to 0 via intValue=0) + } bool typeFlagId; // true if identifier is valid ID - struct { - long intValue = 0; // for number and dimension - double doubleValue = 0; // for number and dimension - bool typeFlagInteger; // for number and dimension - true if number is integer, false if double - } - struct { - uint unicodeRangeStart; // for unicodeRange (initialized to 0 via intValue=0) - uint unicodeRangeEnd; // for unicodeRange (initialized to 0 via intValue=0) - } } } diff --git a/src/dlangui/graphics/ftfonts.d b/src/dlangui/graphics/ftfonts.d index b1aed796..6c99a8b9 100644 --- a/src/dlangui/graphics/ftfonts.d +++ b/src/dlangui/graphics/ftfonts.d @@ -538,7 +538,7 @@ class FreeTypeFontManager : FontManager { FontFileItem best = null; int bestScore = 0; string[] faces = face ? split(face, ",") : null; - foreach(int index, FontFileItem item; _fontFiles) { + foreach(size_t index, FontFileItem item; _fontFiles) { int score = 0; int bestFaceMatch = 0; if (faces && face.length) { diff --git a/src/dlangui/graphics/scene/scene3d.d b/src/dlangui/graphics/scene/scene3d.d index 98194dd3..acb3ea1f 100644 --- a/src/dlangui/graphics/scene/scene3d.d +++ b/src/dlangui/graphics/scene/scene3d.d @@ -120,7 +120,7 @@ bool visit(Node3d node, bool delegate(Node3d node) visitor) { if (res) return true; foreach(child; node.children) { - bool res = visit(child, visitor); + res = visit(child, visitor); if (res) return true; } diff --git a/src/dlangui/widgets/editors.d b/src/dlangui/widgets/editors.d index 534b003c..e60d1e8c 100644 --- a/src/dlangui/widgets/editors.d +++ b/src/dlangui/widgets/editors.d @@ -3446,11 +3446,11 @@ class EditBox : EditWidgetBase { rc.offset(0, yOffset); Rect[] wrappedSelection; wrappedSelection.length = curSpan.len; - foreach (int i, wrapLineRect; wrappedSelection) + foreach (size_t i, wrapLineRect; wrappedSelection) { int startingDifference = rc.left - _clientRect.left; wrapLineRect = rc; - wrapLineRect.offset(-1 * curSpan.accumulation(i, LineSpan.WrapPointInfo.Width), i * _lineHeight); + wrapLineRect.offset(-1 * curSpan.accumulation(cast(int)i, LineSpan.WrapPointInfo.Width), cast(int)i * _lineHeight); wrapLineRect.right = limitNumber(wrapLineRect.right,(rc.left + curSpan.wrapPoints[i].wrapWidth) - startingDifference); buf.fillRect(wrapLineRect, color); } @@ -3796,9 +3796,9 @@ class EditBox : EditWidgetBase { wrappedLine = _span[i].wrappedContent; int accumulativeLength; CustomCharProps[] wrapProps; - foreach (int q, curWrap; wrappedLine) + foreach (size_t q, curWrap; wrappedLine) { - auto lineOffset = q + i + wrapsUpTo(i + _firstVisibleLine); + int lineOffset = cast(int)q + i + wrapsUpTo(i + _firstVisibleLine); if (highlight) { wrapProps = highlight[accumulativeLength .. $];