Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba
Status: | Merged |
---|---|
Approved by: | Matthias Brantner |
Approved revision: | 11159 |
Merged at revision: | 11341 |
Proposed branch: | lp:~paul-lucas/zorba/pjl-misc |
Merge into: | lp:zorba |
Diff against target: |
10 lines (+1/-0) 1 file modified
src/store/api/item_handle.h (+1/-0) |
To merge this branch: | bzr merge lp:~paul-lucas/zorba/pjl-misc |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthias Brantner | Approve | ||
Paul J. Lucas | Approve | ||
Review via email: mp+157011@code.launchpad.net |
Commit message
Added:
bool ItemHandle:
so you can write code like:
if ( !h )
rather than the annoying:
if ( !h.getp() )
Note that is a hack fix. The correct way to do this is by adding conversion-to-bool. However, adding that causes ambiguities because whoever wrote ItemHandle added implicit conversion to T* which is wrong. Removing implicit conversion to T*, however, breaks too much code; hence the hack fix.
Description of the change
Added:
bool ItemHandle:
so you can write code like:
if ( !h )
rather than the annoying:
if ( !h.getp() )
Note that is a hack fix. The correct way to do this is by adding conversion-to-bool. However, adding that causes ambiguities because whoever wrote ItemHandle added implicit conversion to T* which is wrong. Removing implicit conversion to T*, however, breaks too much code; hence the hack fix.
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ pjl-misc- 2013-04- 04T03-44- 47.432Z/ log.html
Log at: http://