Summary: | [Texmap] Improve TextureMapperGL readability | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Noam Rosenthal <noam> | ||||||
Component: | Layout and Rendering | Assignee: | Noam Rosenthal <noam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | mrobinson, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Noam Rosenthal
2012-04-09 09:25:17 PDT
Created attachment 136240 [details]
Patch
Comment on attachment 136240 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=136240&action=review > Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:53 > +#define GL_CMD(...) do { __VA_ARGS__; ASSERT_ARG(__VA_ARGS__, !glGetError()); } while (0) Is the do-while loop here necessary to allow the semicolon? Having two semicolons in a row and a semicolon following an orphan block is fine in C/C++. For instance this compiles just fine for me: int main(int argc, const char* argv[]) { { printf("hey\n"); return 0; }; } (In reply to comment #2) > (From update of attachment 136240 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=136240&action=review > > > Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:53 > > +#define GL_CMD(...) do { __VA_ARGS__; ASSERT_ARG(__VA_ARGS__, !glGetError()); } while (0) > > Is the do-while loop here necessary to allow the semicolon? Having two semicolons in a row and a semicolon following an orphan block is fine in C/C++. > > For instance this compiles just fine for me: > > > int main(int argc, const char* argv[]) > { > { > printf("hey\n"); > return 0; > }; > } I copied that trick from Assertions.h :) Orphan semi-colons might break if statements without a brace-block. Created attachment 136384 [details]
Patch for landing
Comment on attachment 136384 [details] Patch for landing Rejecting attachment 136384 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: Hunk #13 FAILED at 445. Hunk #14 succeeded at 500 (offset -7 lines). Hunk #15 succeeded at 534 (offset -7 lines). Hunk #16 succeeded at 564 (offset -7 lines). Hunk #17 succeeded at 609 (offset -7 lines). Hunk #18 succeeded at 637 (offset -7 lines). 3 out of 18 hunks FAILED -- saving rejects to file Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp.rej Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue/ Full output: http://queues.webkit.org/results/12371639 Comment on attachment 136384 [details] Patch for landing Clearing flags on attachment: 136384 Committed r113684: <http://trac.webkit.org/changeset/113684> All reviewed patches have been landed. Closing bug. |