Mir

Code review comment for lp:~alan-griffiths/mir/drag-and-drop-II

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

On 20/03/17 18:52, Brandon Schaefer wrote:
>> + // Can't use std::copy() as the CapnP iterators don't provide an iterator category
>> + for (auto p = dnd_handle.begin(); p != dnd_handle.end(); ++p)
>> + blob->data_.push_back(*p);
> You should be able to do:
> std::copy(std::begin(dnd_handle), std::end(dnd_handle), std::begin(blob->data_));

Well, I can't.

> Able to do this with the cookie, which seems to work
>

Maybe there's something else needed too: the return type of
getDndHandle() is ::capnp::List< ::uint8_t>::Reader whereas getCookie()
returns ::capnp::Data::Reader.

--
Alan Griffiths +44 (0)798 9938 758
Octopull Ltd http://www.octopull.co.uk/

« Back to merge proposal