Skip to content

Commit

Permalink
Changes prefix of storage for computed properties. Refs #37.
Browse files Browse the repository at this point in the history
  • Loading branch information
gradha committed Jun 2, 2015
1 parent 684d839 commit ed8371e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/SGPS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ enum Accuracy

static private let cInstance: SGPS = SGPS()

private var mSaveAllPositions = false
private var mGpsIsOn = false
private var _saveAllPositions = false
private var _GpsIsOn = false
private var mManager: CLLocationManager
private var mAccuracy: Accuracy
private var mNoLog = false
Expand All @@ -42,7 +42,7 @@ enum Accuracy
if defaults.boolForKey(_GPS_IS_ON_KEY) {
start()
}
mSaveAllPositions = defaults.boolForKey(_KEY_SAVE_SINGLE_POSITION)
_saveAllPositions = defaults.boolForKey(_KEY_SAVE_SINGLE_POSITION)
}

deinit {
Expand All @@ -51,19 +51,19 @@ enum Accuracy
}

var saveAllPositions: Bool {
get { return mSaveAllPositions }
get { return _saveAllPositions }
set {
mSaveAllPositions = newValue
_saveAllPositions = newValue
let defaults = NSUserDefaults.standardUserDefaults()
defaults.setBool(newValue, forKey:_KEY_SAVE_SINGLE_POSITION)
defaults.synchronize()
}
}

var gpsIsOn: Bool {
get { return mGpsIsOn }
get { return _GpsIsOn }
set {
mGpsIsOn = newValue
_GpsIsOn = newValue
let defaults = NSUserDefaults.standardUserDefaults()
defaults.setBool(newValue, forKey:_GPS_IS_ON_KEY)
defaults.synchronize()
Expand Down Expand Up @@ -118,7 +118,7 @@ enum Accuracy
func start() -> Bool
{
if CLLocationManager.locationServicesEnabled() {
if (!mGpsIsOn && !mNoLog) {
if (!gpsIsOn && !mNoLog) {
DB.get().log("Starting to update location")
}

Expand Down

0 comments on commit ed8371e

Please sign in to comment.