Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3dda2f3

Browse files
author
Jeremy Wootten
authored
Fix terminal warning re unsafe cast (elementary#889)
1 parent f4b7c6c commit 3dda2f3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

plugins/outline/C/CtagsSymbolOutline.vala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ public class Code.Plugins.CtagsSymbolOutline : Object, Code.Plugins.SymbolOutlin
3333
store = new Granite.Widgets.SourceList ();
3434
store.root.add (root);
3535
store.item_selected.connect ((selected) => {
36-
if (selected == null) return;
37-
goto (doc, (selected as CtagsSymbol).line);
36+
if (selected == null) {
37+
return;
38+
}
39+
40+
goto (doc, ((CtagsSymbol)selected).line);
3841
store.selected = null;
3942
});
4043
}

plugins/outline/Vala/ValaSymbolOutline.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class Code.Plugins.ValaSymbolOutline : Object, Code.Plugins.SymbolOutline
3232

3333
store = new Granite.Widgets.SourceList ();
3434
store.item_selected.connect ((selected) => {
35-
goto (doc, (selected as ValaSymbolItem).symbol.source_reference.begin.line);
35+
goto (doc, ((ValaSymbolItem)selected).symbol.source_reference.begin.line);
3636
});
3737

3838
root = new Granite.Widgets.SourceList.ExpandableItem (_("Symbols"));

0 commit comments

Comments
 (0)