OSDN Git Service
(root)
/
kcd
/
KCD.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af19e8a
)
varを使わないように変更
author
masakih
<masakih@users.sourceforge.jp>
Sun, 15 Oct 2017 03:04:07 +0000
(12:04 +0900)
committer
masakih
<masakih@users.sourceforge.jp>
Sun, 15 Oct 2017 03:04:07 +0000
(12:04 +0900)
KCD/ResourceHistoryManager.swift
patch
|
blob
|
history
diff --git
a/KCD/ResourceHistoryManager.swift
b/KCD/ResourceHistoryManager.swift
index
a37ce67
..
47c9aa6
100644
(file)
--- a/
KCD/ResourceHistoryManager.swift
+++ b/
KCD/ResourceHistoryManager.swift
@@
-81,9
+81,8
@@
final class ResourceHistoryManager: NSObject {
let now = Date()
var nowComp = Calendar.current
.dateComponents([.year, .month, .day, .hour, .minute], from: now)
- var minutes = nowComp.minute.map { ($0 + 2) / 5 } ?? 0
- minutes *= 5
- nowComp.minute = minutes
+ let minutes = nowComp.minute.map { ($0 + 2) / 5 } ?? 0
+ nowComp.minute = minutes * 5
newHistory.date = Calendar.current.date(from: nowComp)!
newHistory.minute = (minutes != 60) ? minutes : 0