Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3961)

Unified Diff: base/ios/ios_util.mm

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/ios/ios_util.h ('k') | base/ios/scoped_critical_action.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/ios/ios_util.mm
diff --git a/base/ios/ios_util.mm b/base/ios/ios_util.mm
index 554a2029c8060cb9fad57b3200b989ae09f6e083..627fb403e1980d7b482d848d4bfba846e0fec8ab 100644
--- a/base/ios/ios_util.mm
+++ b/base/ios/ios_util.mm
@@ -5,14 +5,16 @@
#include "base/ios/ios_util.h"
#import <Foundation/Foundation.h>
+#include <stddef.h>
+#include "base/macros.h"
#include "base/sys_info.h"
namespace {
// Return a 3 elements array containing the major, minor and bug fix version of
// the OS.
-const int32* OSVersionAsArray() {
- int32* digits = new int32[3];
+const int32_t* OSVersionAsArray() {
+ int32_t* digits = new int32_t[3];
base::SysInfo::OperatingSystemVersionNumbers(
&digits[0], &digits[1], &digits[2]);
return digits;
@@ -31,9 +33,9 @@ bool IsRunningOnIOS9OrLater() {
return IsRunningOnOrLater(9, 0, 0);
}
-bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix) {
- static const int32* current_version = OSVersionAsArray();
- int32 version[] = { major, minor, bug_fix };
+bool IsRunningOnOrLater(int32_t major, int32_t minor, int32_t bug_fix) {
+ static const int32_t* current_version = OSVersionAsArray();
+ int32_t version[] = {major, minor, bug_fix};
for (size_t i = 0; i < arraysize(version); i++) {
if (current_version[i] != version[i])
return current_version[i] > version[i];
« no previous file with comments | « base/ios/ios_util.h ('k') | base/ios/scoped_critical_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698