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

Side by Side Diff: src/core/SkTime.cpp

Issue 1313203003: Remove include of stdlib.h from SkTypes.h. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up qsort conversion. Created 5 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « src/core/SkResourceCache.cpp ('k') | src/pathops/SkOpAngle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkString.h" 8 #include "SkString.h"
9 #include "SkTime.h" 9 #include "SkTime.h"
10 10
11 void SkTime::DateTime::toISO8601(SkString* dst) const { 11 void SkTime::DateTime::toISO8601(SkString* dst) const {
12 if (dst) { 12 if (dst) {
13 int timeZoneMinutes = SkToInt(fTimeZoneMinutes); 13 int timeZoneMinutes = SkToInt(fTimeZoneMinutes);
14 char timezoneSign = timeZoneMinutes >= 0 ? '+' : '-'; 14 char timezoneSign = timeZoneMinutes >= 0 ? '+' : '-';
15 int timeZoneHours = abs(timeZoneMinutes) / 60; 15 int timeZoneHours = SkTAbs(timeZoneMinutes) / 60;
16 timeZoneMinutes = abs(timeZoneMinutes) % 60; 16 timeZoneMinutes = SkTAbs(timeZoneMinutes) % 60;
17 dst->printf("%04u-%02u-%02uT%02u:%02u:%02u%c%02d:%02d", 17 dst->printf("%04u-%02u-%02uT%02u:%02u:%02u%c%02d:%02d",
18 static_cast<unsigned>(fYear), static_cast<unsigned>(fMonth), 18 static_cast<unsigned>(fYear), static_cast<unsigned>(fMonth),
19 static_cast<unsigned>(fDay), static_cast<unsigned>(fHour), 19 static_cast<unsigned>(fDay), static_cast<unsigned>(fHour),
20 static_cast<unsigned>(fMinute), 20 static_cast<unsigned>(fMinute),
21 static_cast<unsigned>(fSecond), timezoneSign, timeZoneHours, 21 static_cast<unsigned>(fSecond), timezoneSign, timeZoneHours,
22 timeZoneMinutes); 22 timeZoneMinutes);
23 } 23 }
24 } 24 }
OLDNEW
« no previous file with comments | « src/core/SkResourceCache.cpp ('k') | src/pathops/SkOpAngle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698