From 405ad362398c85b913c98ff11fc8d1a20c084f25 Mon Sep 17 00:00:00 2001 From: Yury Melnichek Date: Fri, 1 Apr 2011 19:35:26 +0200 Subject: [PATCH] Remove trailing whitespaces. --- iphone/Common/CustomAlertView.h | 2 +- iphone/Common/CustomAlertView.mm | 4 +-- iphone/Common/GetActiveConnectionType.h | 4 +-- iphone/Common/WebViewController.mm | 4 +-- iphone/Maps/Classes/MapViewController.mm | 8 +++--- iphone/Maps/IPhoneLocator.h | 8 +++--- iphone/Maps/IPhoneLocator.mm | 28 +++++++++---------- iphone/Maps/Platform/IPhoneDownload.mm | 2 +- iphone/Maps/Platform/IPhoneDownloadManager.mm | 2 +- .../Maps/Settings/CountriesViewController.mm | 8 +++--- iphone/Maps/Settings/SettingsManager.mm | 2 +- iphone/Sloynik/Shared/global.mm | 2 +- 12 files changed, 37 insertions(+), 37 deletions(-) diff --git a/iphone/Common/CustomAlertView.h b/iphone/Common/CustomAlertView.h index a167431f0c..4b41b47450 100644 --- a/iphone/Common/CustomAlertView.h +++ b/iphone/Common/CustomAlertView.h @@ -6,7 +6,7 @@ { } -- (id) initWithTitle:(NSString *)title message:(NSString *)message +- (id) initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ...; diff --git a/iphone/Common/CustomAlertView.mm b/iphone/Common/CustomAlertView.mm index 16f050a533..c18bd5310b 100644 --- a/iphone/Common/CustomAlertView.mm +++ b/iphone/Common/CustomAlertView.mm @@ -4,7 +4,7 @@ - (id) initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ... -{ +{ if ((self = [super initWithTitle:title message:message delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil, nil])) { @@ -12,7 +12,7 @@ va_start(args, otherButtonTitles); for (NSString * anOtherButtonTitle = otherButtonTitles; anOtherButtonTitle != nil; anOtherButtonTitle = va_arg(args, NSString*)) [self addButtonWithTitle:anOtherButtonTitle]; - + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil]; } diff --git a/iphone/Common/GetActiveConnectionType.h b/iphone/Common/GetActiveConnectionType.h index 2cded53f76..a93c054771 100644 --- a/iphone/Common/GetActiveConnectionType.h +++ b/iphone/Common/GetActiveConnectionType.h @@ -16,7 +16,7 @@ TActiveConnectionType GetActiveConnectionType() bzero(&zeroAddress, sizeof(zeroAddress)); zeroAddress.sin_len = sizeof(zeroAddress); zeroAddress.sin_family = AF_INET; - + // Recover reachability flags SCNetworkReachabilityRef defaultRoute = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&zeroAddress); SCNetworkReachabilityFlags flags; @@ -24,7 +24,7 @@ TActiveConnectionType GetActiveConnectionType() CFRelease(defaultRoute); if (!didRetrieveFlags) return ENotConnected; - + BOOL isReachable = flags & kSCNetworkFlagsReachable; BOOL isWifi = !(flags & kSCNetworkReachabilityFlagsIsWWAN); BOOL needsConnection = flags & kSCNetworkFlagsConnectionRequired; diff --git a/iphone/Common/WebViewController.mm b/iphone/Common/WebViewController.mm index 9b4442cf4d..4f3d142303 100644 --- a/iphone/Common/WebViewController.mm +++ b/iphone/Common/WebViewController.mm @@ -25,7 +25,7 @@ { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; - + // Release any cached data, images, etc that aren't in use. } @@ -41,7 +41,7 @@ webView.autoresizingMask= (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth); [webView loadRequest:[NSURLRequest requestWithURL:m_url]]; - + self.view = webView; [webView release]; } diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 5a6e444f5a..964a3514ed 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -98,21 +98,21 @@ typedef FrameWork framework_t; shared_ptr windowHandle = [(EAGLView*)self.view windowHandle]; shared_ptr resourceManager = [(EAGLView*)self.view resourceManager]; - + m_locator = shared_ptr(new iphone::Locator()); - + // tricky boost::bind for objC class methods typedef void (*TUpdateLocationFunc)(id, SEL, m2::PointD const &, double, double, double); SEL updateLocationSel = @selector(OnUpdateLocation:withErrorRadius:withLocTimeStamp:withCurTimeStamp:); TUpdateLocationFunc updateLocationImpl = (TUpdateLocationFunc)[self methodForSelector:updateLocationSel]; - + typedef void (*TChangeModeFunc)(id, SEL, Locator::EMode, Locator::EMode); SEL changeModeSel = @selector(OnChangeLocatorMode:withNewMode:); TChangeModeFunc changeModeImpl = (TChangeModeFunc)[self methodForSelector:changeModeSel]; m_locator->addOnUpdateLocationFn(boost::bind(updateLocationImpl, self, updateLocationSel, _1, _2, _3, _4)); m_locator->addOnChangeModeFn(boost::bind(changeModeImpl, self, changeModeSel, _1, _2)); - + m_framework = new framework_t(windowHandle, 40); m_framework->InitStorage(m_storage); m_framework->InitLocator(m_locator); diff --git a/iphone/Maps/IPhoneLocator.h b/iphone/Maps/IPhoneLocator.h index 64a0ed8831..4db831532e 100644 --- a/iphone/Maps/IPhoneLocator.h +++ b/iphone/Maps/IPhoneLocator.h @@ -36,15 +36,15 @@ namespace iphone class Locator : public ::Locator { private: - + LocatorThunk * m_thunk; UserLocationController * m_locationController; - + public: - + Locator(); ~Locator(); - + void start(EMode mode); void stop(); void setMode(EMode mode); diff --git a/iphone/Maps/IPhoneLocator.mm b/iphone/Maps/IPhoneLocator.mm index a033c4980f..18cb25d69b 100644 --- a/iphone/Maps/IPhoneLocator.mm +++ b/iphone/Maps/IPhoneLocator.mm @@ -22,15 +22,15 @@ withErrorRadius: (double) errorRadius withTimestamp: (NSDate *) timestamp; { - self.locator->locationUpdate(mercatorPoint, - errorRadius, - [timestamp timeIntervalSince1970], + self.locator->locationUpdate(mercatorPoint, + errorRadius, + [timestamp timeIntervalSince1970], [[NSDate date] timeIntervalSince1970]); } - (void) OnHeading: (CLHeading*) heading { - self.locator->headingUpdate(heading.trueHeading, + self.locator->headingUpdate(heading.trueHeading, heading.magneticHeading, heading.headingAccuracy); } @@ -50,47 +50,47 @@ namespace iphone [m_thunk initWithLocator:this]; m_locationController = [[UserLocationController alloc] initWithDelegate:m_thunk]; } - + Locator::~Locator() { stop(); [m_locationController release]; [m_thunk release]; } - + void Locator::start(EMode mode) { ::Locator::setMode(mode); - + if (mode == ERoughMode) [m_locationController.locationManager startMonitoringSignificantLocationChanges]; else [m_locationController.locationManager startUpdatingLocation]; - + if ([CLLocationManager headingAvailable]) { m_locationController.locationManager.headingFilter = 1; [m_locationController.locationManager startUpdatingHeading]; } } - + void Locator::stop() { if (mode() == ERoughMode) [m_locationController.locationManager stopMonitoringSignificantLocationChanges]; else [m_locationController.locationManager stopUpdatingLocation]; - + if ([CLLocationManager headingAvailable]) [m_locationController.locationManager stopUpdatingHeading]; } - + void Locator::setMode(EMode mode) { EMode oldMode = ::Locator::mode(); ::Locator::setMode(mode); callOnChangeModeFns(oldMode, mode); - + if (mode == ERoughMode) { [m_locationController.locationManager stopUpdatingLocation]; @@ -102,12 +102,12 @@ namespace iphone [m_locationController.locationManager startUpdatingLocation]; } } - + void Locator::locationUpdate(m2::PointD const & pt, double errorRadius, double locTimeStamp, double curTimeStamp) { callOnUpdateLocationFns(pt, errorRadius, locTimeStamp, curTimeStamp); } - + void Locator::headingUpdate(double trueHeading, double magneticHeading, double accuracy) { callOnUpdateHeadingFns(trueHeading, magneticHeading, accuracy); diff --git a/iphone/Maps/Platform/IPhoneDownload.mm b/iphone/Maps/Platform/IPhoneDownload.mm index 2eb3ebd682..397928e9e4 100644 --- a/iphone/Maps/Platform/IPhoneDownload.mm +++ b/iphone/Maps/Platform/IPhoneDownload.mm @@ -186,7 +186,7 @@ string GetUniqueHashedId() // enable network activity indicator in top system toolbar [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; - + m_projectedFileSize = [response expectedContentLength]; // if server doesn't support resume, make sure we're downloading file from scratch if (m_projectedFileSize < 0) diff --git a/iphone/Maps/Platform/IPhoneDownloadManager.mm b/iphone/Maps/Platform/IPhoneDownloadManager.mm index c52d79a432..aa1fd44a08 100644 --- a/iphone/Maps/Platform/IPhoneDownloadManager.mm +++ b/iphone/Maps/Platform/IPhoneDownloadManager.mm @@ -62,7 +62,7 @@ public: // disable network activity indicator in top system toolbar // note that this method is called also from successful/failed download to "selfdestruct" below [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; - + for (NSUInteger i = 0; i < [activeDownloads count]; ++i) { IPhoneDownload * download = [activeDownloads objectAtIndex:i]; diff --git a/iphone/Maps/Settings/CountriesViewController.mm b/iphone/Maps/Settings/CountriesViewController.mm index 05ea69ee44..0123e9a2b3 100644 --- a/iphone/Maps/Settings/CountriesViewController.mm +++ b/iphone/Maps/Settings/CountriesViewController.mm @@ -67,7 +67,7 @@ static bool IsOurIndex(TIndex const & theirs, TIndex const & ours) NSString * filePath = [NSString stringWithUTF8String:sFilePath.c_str()]; NSURL * url = [NSURL fileURLWithPath:filePath]; - WebViewController * aboutViewController = + WebViewController * aboutViewController = [[WebViewController alloc] initWithUrl:url andTitleOrNil:@"About"]; [self.navigationController pushViewController:aboutViewController animated:YES]; [aboutViewController release]; @@ -83,7 +83,7 @@ static bool IsOurIndex(TIndex const & theirs, TIndex const & ours) target:self action:@selector(OnCloseButton:)]; self.navigationItem.rightBarButtonItem = closeButton; [closeButton release]; - + self.navigationItem.title = header; // About button is displayed only on first view in hierarchy @@ -308,7 +308,7 @@ TIndex g_clickedIndex; message:@"Please, use WiFi to download large countries" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; - [alert release]; + [alert release]; } else { @@ -355,7 +355,7 @@ TIndex g_clickedIndex; cancelButtonTitle: @"Do Nothing" destructiveButtonTitle: @"Cancel Download" otherButtonTitles: nil]; - [popupQuery showFromRect: [cell frame] inView: tableView animated: YES]; + [popupQuery showFromRect: [cell frame] inView: tableView animated: YES]; [popupQuery release]; } break; diff --git a/iphone/Maps/Settings/SettingsManager.mm b/iphone/Maps/Settings/SettingsManager.mm index 3380458325..36ce125f8f 100644 --- a/iphone/Maps/Settings/SettingsManager.mm +++ b/iphone/Maps/Settings/SettingsManager.mm @@ -79,7 +79,7 @@ using namespace storage; boost::bind(progressImpl, self, progressSel, _1, _2), boost::bind(updateImpl, self, updateSel, _1, _2)); } - + // Transition views. [m_prevController presentModalViewController:m_navController animated:YES]; // This has bugs when device orientation is changed. diff --git a/iphone/Sloynik/Shared/global.mm b/iphone/Sloynik/Shared/global.mm index 550343da87..fcc12ad7a9 100644 --- a/iphone/Sloynik/Shared/global.mm +++ b/iphone/Sloynik/Shared/global.mm @@ -71,5 +71,5 @@ sl::SloynikEngine * GetSloynikEngine() s_pEngine = new sl::SloynikEngine(dictionaryPath, indexPath, strFn); LogTimeCounter("EngineStartUp", "Engine started."); } - return s_pEngine; + return s_pEngine; }