Skip to content

Commit cbe6b00

Browse files
committed
clean code
no longer unnecessarily wrapping conditionals or arguments in parentheses
1 parent 1c5db3a commit cbe6b00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

BeeSwift/GoalViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ class GoalViewController: UIViewController, UIScrollViewDelegate, DatapointTabl
298298
}
299299

300300
self.navigationItem.rightBarButtonItems = [UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(self.actionButtonPressed))]
301-
if (!self.goal.hideDataEntry) {
301+
if !self.goal.hideDataEntry {
302302
self.navigationItem.rightBarButtonItems?.append(UIBarButtonItem(image: UIImage.init(named: "Timer"), style: .plain, target: self, action: #selector(self.timerButtonPressed)))
303303
}
304304

@@ -457,12 +457,12 @@ class GoalViewController: UIViewController, UIScrollViewDelegate, DatapointTabl
457457
}
458458

459459
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
460-
if (textField.isEqual(self.valueTextField)) {
460+
if textField.isEqual(self.valueTextField) {
461461
// Only allow a single decimal separator (, or .)
462462
if textField.text!.components(separatedBy: ".").count > 1 {
463463
if string == "." || string == "," { return false }
464464
}
465-
if (string == ",") {
465+
if string == "," {
466466
textField.text = textField.text! + "."
467467
return false
468468
}

0 commit comments

Comments
 (0)