From a213254572c6a38c61e6391b2b29f4a19c64ab16 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Sun, 17 Dec 2017 20:58:16 +0100 Subject: [PATCH] Use private where appropriate --- VimR/VimR/AppDelegateReducer.swift | 10 +++++----- VimR/VimR/AppearancePrefReducer.swift | 2 +- VimR/VimR/HtmlPreviewToolReducer.swift | 2 +- VimR/VimR/PreviewReducer.swift | 2 +- VimR/VimR/PreviewToolReducer.swift | 2 +- VimR/VimR/UiRootReducer.swift | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/VimR/VimR/AppDelegateReducer.swift b/VimR/VimR/AppDelegateReducer.swift index 31ccda92..c6164577 100644 --- a/VimR/VimR/AppDelegateReducer.swift +++ b/VimR/VimR/AppDelegateReducer.swift @@ -46,9 +46,9 @@ class AppDelegateReducer { return StateActionPair(state: state, action: pair.action) } - fileprivate let baseServerUrl: URL + private let baseServerUrl: URL - fileprivate func newMainWindow(with state: AppState, + private func newMainWindow(with state: AppState, urls: [URL], cwd: URL, nvimArgs: [String]? = nil, @@ -75,10 +75,10 @@ class AppDelegateReducer { return mainWindow } - fileprivate func frame(relativeTo refFrame: CGRect) -> CGRect { + private func frame(relativeTo refFrame: CGRect) -> CGRect { return refFrame.offsetBy(dx: cascadeX, dy: -cascadeY) } } -fileprivate let cascadeX: CGFloat = 24.0 -fileprivate let cascadeY: CGFloat = 24.0 +private let cascadeX: CGFloat = 24.0 +private let cascadeY: CGFloat = 24.0 diff --git a/VimR/VimR/AppearancePrefReducer.swift b/VimR/VimR/AppearancePrefReducer.swift index 8376069e..17c4405f 100644 --- a/VimR/VimR/AppearancePrefReducer.swift +++ b/VimR/VimR/AppearancePrefReducer.swift @@ -37,7 +37,7 @@ class AppearancePrefReducer { return StateActionPair(state: state, action: pair.action) } - fileprivate func modify(state: inout AppState, with appearance: AppearanceState) { + private func modify(state: inout AppState, with appearance: AppearanceState) { state.mainWindowTemplate.appearance = appearance state.mainWindows.keys.forEach { state.mainWindows[$0]?.appearance = appearance } } diff --git a/VimR/VimR/HtmlPreviewToolReducer.swift b/VimR/VimR/HtmlPreviewToolReducer.swift index 171034fb..d917f8e8 100644 --- a/VimR/VimR/HtmlPreviewToolReducer.swift +++ b/VimR/VimR/HtmlPreviewToolReducer.swift @@ -33,5 +33,5 @@ class HtmlPreviewToolReducer { return StateActionPair(state: UuidState(uuid: state.uuid, state: state), action: pair.action) } - fileprivate let baseServerUrl: URL + private let baseServerUrl: URL } diff --git a/VimR/VimR/PreviewReducer.swift b/VimR/VimR/PreviewReducer.swift index fbb1797d..aab62ca1 100644 --- a/VimR/VimR/PreviewReducer.swift +++ b/VimR/VimR/PreviewReducer.swift @@ -126,5 +126,5 @@ class MarkdownReducer { self.baseServerUrl = baseServerUrl } - fileprivate let baseServerUrl: URL + private let baseServerUrl: URL } diff --git a/VimR/VimR/PreviewToolReducer.swift b/VimR/VimR/PreviewToolReducer.swift index bd0a9d12..1637a1cf 100644 --- a/VimR/VimR/PreviewToolReducer.swift +++ b/VimR/VimR/PreviewToolReducer.swift @@ -35,5 +35,5 @@ class PreviewToolReducer { return StateActionPair(state: UuidState(uuid: state.uuid, state: state), action: pair.action) } - fileprivate let baseServerUrl: URL + private let baseServerUrl: URL } diff --git a/VimR/VimR/UiRootReducer.swift b/VimR/VimR/UiRootReducer.swift index c215efb9..a0e2b898 100644 --- a/VimR/VimR/UiRootReducer.swift +++ b/VimR/VimR/UiRootReducer.swift @@ -23,7 +23,7 @@ class UiRootReducer { isFullScreen: isFullScreen ) - case let .frameChanged(to: frame): + case let .frameChanged(to:frame): if uuid == appState.currentMainWindowUuid { appState.mainWindowTemplate.frame = frame } @@ -59,9 +59,9 @@ class UiRootReducer { return StateActionPair(state: appState, action: pair.action) } - fileprivate func mainWindowTemplate(from old: MainWindow.State, - new: MainWindow.State, - isFullScreen: Bool) -> MainWindow.State { + private func mainWindowTemplate(from old: MainWindow.State, + new: MainWindow.State, + isFullScreen: Bool) -> MainWindow.State { var result = old