|
|
DescriptionIs char* or uintptr_t easier to read?
Using a char* instead of uintptr_t allows us to use fewer
reinterpret_casts which may make the code easier to read.
BUG=648512
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356703002
Committed: https://skia.googlesource.com/skia/+/921bc678a7b81de31b4e672326ed2f37ffb66b10
Patch Set 1 #Patch Set 2 : Rebasing. #Messages
Total messages: 22 (10 generated)
Description was changed from ========== Is char* or uintptr_t easier to read? Using a char* instead of uintptr_t allows us to use fewer reinterpret_casts which may make the code easier to read. BUG=648512 ========== to ========== Is char* or uintptr_t easier to read? Using a char* instead of uintptr_t allows us to use fewer reinterpret_casts which may make the code easier to read. BUG=648512 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356703002 ==========
cblume@chromium.org changed reviewers: + bsalomon@google.com, ericrk@chromium.org
PTAL This is only to see if we prefer this style of code for readability. Using char* may allow us to use fewer reinterpret_casts, which might make the code cleaner. However, when we need to SkAlign8() we have to cast to uintrptr_t and back, which is harder to read.
On 2016/09/20 06:19:16, cblume wrote: > PTAL > > This is only to see if we prefer this style of code for readability. > > Using char* may allow us to use fewer reinterpret_casts, which might make the > code cleaner. > > However, when we need to SkAlign8() we have to cast to uintrptr_t and back, > which is harder to read. Chiming in from the sideline - I usually prefer char* in these scenarios, particularly because the alignment thing can be fixed by defining versions of our alignment utilities that work on pointers.
I'd support adding SkAlign* variants that work on char*.
On 2016/09/20 13:08:02, bsalomon wrote: > I'd support adding SkAlign* variants that work on char*. +1
On 2016/09/20 13:40:08, reed1 wrote: > On 2016/09/20 13:08:02, bsalomon wrote: > > I'd support adding SkAlign* variants that work on char*. > > +1 +1 for adding these and using char*
The CQ bit was checked by cblume@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Okay, sounds pretty unanimous that we all prefer char*. Thank you for that recommendation, Eric! :D Should we go ahead and land this patch? Then I can make a separate patch with SkAlign* and loads of tests for it.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/09/20 18:09:28, cblume wrote: > Okay, sounds pretty unanimous that we all prefer char*. Thank you for that > recommendation, Eric! :D > > Should we go ahead and land this patch? > > Then I can make a separate patch with SkAlign* and loads of tests for it. Bug for SkAlign* changes: https://bugs.chromium.org/p/chromium/issues/detail?id=648818
lgtm
The CQ bit was checked by cblume@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: Build-Win-MSVC-x86-Debug-Trybot on master.client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86-D...)
The CQ bit was checked by cblume@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Is char* or uintptr_t easier to read? Using a char* instead of uintptr_t allows us to use fewer reinterpret_casts which may make the code easier to read. BUG=648512 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356703002 ========== to ========== Is char* or uintptr_t easier to read? Using a char* instead of uintptr_t allows us to use fewer reinterpret_casts which may make the code easier to read. BUG=648512 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356703002 Committed: https://skia.googlesource.com/skia/+/921bc678a7b81de31b4e672326ed2f37ffb66b10 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/921bc678a7b81de31b4e672326ed2f37ffb66b10 |