Bug 48505 - Change Noncopyable macro to avoid using two subsequent line
Summary: Change Noncopyable macro to avoid using two subsequent line
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 46589
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-28 03:38 PDT by Zoltan Horvath
Modified: 2010-11-04 00:44 PDT (History)
1 user (show)

See Also:


Attachments
proposed patch (2.14 KB, patch)
2010-10-28 03:39 PDT, Zoltan Horvath
darin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltan Horvath 2010-10-28 03:38:28 PDT
With the actual WTF_MAKE_NONCOPYABLE and WTF_MAKE_FAST_ALLOCATED macro implementations when a class needs to be Noncopyable and FastAllocated as well we'd have needed to add 2 subsequent line 1-1 for each macro.
With this change we can use these in one line.

Examples:

In the case when Example is not instantiated by new and needs to be Noncopyable:
class Example {
    WTF_MAKE_NONCOPYABLE(Example);
};

In the case when Example is instantiated by new and needs to be Noncopyable:
class Example {
    WTF_MAKE_NONCOPYABLE(Example, WTF_MAKE_FAST_ALLOCATED);
};
Comment 1 Zoltan Horvath 2010-10-28 03:39:45 PDT
Created attachment 72166 [details]
proposed patch
Comment 2 Zoltan Horvath 2010-11-02 08:41:35 PDT
This is ping for review.
Comment 3 Darin Adler 2010-11-03 10:29:36 PDT
Comment on attachment 72166 [details]
proposed patch

This doesn’t seem like an improvement to me. Just seems a bit strange. If we want to put things all on one line, we can do that without adding this unusual feature to the macro.
 
    WTF_MAKE_NONCOPYABLE(Example); WTF_MAKE_FAST_ALLOCATED;

I suggest not making this change.
Comment 4 Zoltan Horvath 2010-11-04 00:44:00 PDT
Right! I close the bug as invalid.