mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Code style - Omit the type in a new expressions
This commit is contained in:
1 parent
099f56f4fe
commit
10e6cdc54b
117 files changed
+251
-252
No files matched your search
@@ -54,7 +54,7 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
||||
|
||||
public List<TreeItemViewModel> GetAllChildren()
|
||||
{
|
||||
List<TreeItemViewModel> children = new List<TreeItemViewModel>();
|
||||
List<TreeItemViewModel> children = new();
|
||||
foreach (TreeItemViewModel childFolder in Items)
|
||||
{
|
||||
// Add all children in this element
|
||||
@@ -128,7 +128,7 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
||||
if (!SupportsChildren)
|
||||
throw new ArtemisUIException("Cannot add a folder to a profile element of type " + ProfileElement.GetType().Name);
|
||||
|
||||
Folder _ = new Folder(ProfileElement, "New folder");
|
||||
Folder _ = new(ProfileElement, "New folder");
|
||||
_profileEditorService.UpdateSelectedProfile();
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
||||
if (!SupportsChildren)
|
||||
throw new ArtemisUIException("Cannot add a layer to a profile element of type " + ProfileElement.GetType().Name);
|
||||
|
||||
Layer layer = new Layer(ProfileElement, "New layer");
|
||||
Layer layer = new(ProfileElement, "New layer");
|
||||
|
||||
// Could be null if the default brush got disabled
|
||||
LayerBrushDescriptor brush = _layerBrushService.GetDefaultLayerBrush();
|
||||
@@ -217,7 +217,7 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
||||
Items.Remove(treeItemViewModel);
|
||||
|
||||
// Add missing children
|
||||
List<TreeItemViewModel> newChildren = new List<TreeItemViewModel>();
|
||||
List<TreeItemViewModel> newChildren = new();
|
||||
foreach (ProfileElement profileElement in ProfileElement.Children.OrderBy(c => c.Order))
|
||||
if (profileElement is Folder folder)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user