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

Issue 628763005: Fix usage of SK_BUILD_* defines. (Closed)

Created:
6 years, 2 months ago by tfarina
Modified:
6 years, 2 months ago
Reviewers:
robertphillips
CC:
reviews_skia.org, bsalomon
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Fix usage of SK_BUILD_* defines. Since we just 'define' them, but not attribute anything to them, like '1' for example, cpp expands it to nothing and that breaks the "#if" clauses. To fix that, uses "#if defined(...)" which will correctly check if your macro name was defined or not. BUG=skia:2850 TEST=make most R=robertphillips@google.com Committed: https://skia.googlesource.com/skia/+/6b87df2997980218308954ade47df7fdd6680bc7

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -17 lines) Patch
M dm/DMWriteTask.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkUtilsArm.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tools/skdiff.h View 1 chunk +1 line, -1 line 0 comments Download
M tools/skpdiff/SkCLImageDiffer.h View 1 chunk +1 line, -1 line 0 comments Download
M tools/skpdiff/skpdiff_main.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tools/skpdiff/skpdiff_util.h View 1 chunk +1 line, -1 line 0 comments Download
M tools/skpdiff/skpdiff_util.cpp View 7 chunks +11 lines, -11 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
tfarina
6 years, 2 months ago (2014-10-04 00:28:28 UTC) #1
tfarina
I easily verified this with: $ cat macro_expand.cc #define SK_BUILD_FOR_LINUX #if SK_BUILD_FOR_LINUX #endif $ cpp ...
6 years, 2 months ago (2014-10-04 00:32:56 UTC) #2
robertphillips
lgtm.
6 years, 2 months ago (2014-10-06 17:36:41 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/628763005/1
6 years, 2 months ago (2014-10-06 17:38:34 UTC) #5
commit-bot: I haz the power
6 years, 2 months ago (2014-10-06 17:47:16 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as 6b87df2997980218308954ade47df7fdd6680bc7

Powered by Google App Engine
This is Rietveld 408576698