More agressive warning fixes

capnp/lib/capnp.cpp:35163:294: warning: moving a temporary object prevents copy
      elision [-Wpessimizing-move]
  ...*)__pyx_t_3), new  ::capnp::DynamicStruct::Pipeline(std::move((( ::capn...
                                                         ^
capnp/lib/capnp.cpp:35163:294: note: remove std::move call here
  ...std::move((( ::capnp::DynamicValue::Pipeline)__pyx_v_self->thisptr->get(__pyx_t_5)).releaseAs< ::capnp::DynamicStruct>())...
     ^~~~~~~~~~                                                                                                              ~
capnp/lib/capnp.cpp:39540:53: warning: moving a temporary object prevents copy
      elision [-Wpessimizing-move]
  __pyx_v_self->thisptr = new  ::kj::AsyncIoContext(std::move( ::kj::se...
                                                    ^
capnp/lib/capnp.cpp:39540:53: note: remove std::move call here
  ...= new  ::kj::AsyncIoContext(std::move( ::kj::setupAsyncIo()));
                                 ^~~~~~~~~~                     ~
capnp/lib/capnp.cpp:47838:294: warning: moving a temporary object prevents copy
      elision [-Wpessimizing-move]
  ...*)__pyx_t_3), new  ::capnp::DynamicStruct::Pipeline(std::move((( ::capn...
                                                         ^
capnp/lib/capnp.cpp:47838:294: note: remove std::move call here
  ...std::move((( ::capnp::DynamicValue::Pipeline)__pyx_v_self->thisptr->get(__pyx_t_5)).releaseAs< ::capnp::DynamicStruct>())...
     ^~~~~~~~~~                                                                                                              ~
This commit is contained in:
Jacob Alexander 2019-10-14 23:32:37 -07:00
parent f6dd08dda6
commit 10355a74ac
Failed to generate hash of commit

View file

@ -1477,7 +1477,7 @@ cdef class _DynamicStructPipeline:
if type == capnp.TYPE_CAPABILITY:
return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
elif type == capnp.TYPE_STRUCT:
return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline(moveStructPipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct())), self._parent)
return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)
elif type == capnp.TYPE_UNKNOWN:
raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
else:
@ -1636,7 +1636,7 @@ cdef class _EventLoop:
self._init()
cdef _init(self) except +reraise_kj_exception:
self.thisptr = new capnp.AsyncIoContext(moveAsyncContext(capnp.setupAsyncIo()))
self.thisptr = new capnp.AsyncIoContext(capnp.setupAsyncIo())
def __dealloc__(self):
del self.thisptr #TODO:MEMORY: fix problems with Promises still being around
@ -1976,7 +1976,7 @@ cdef class _RemotePromise:
if type == capnp.TYPE_CAPABILITY:
return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
elif type == capnp.TYPE_STRUCT:
return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline(moveStructPipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct())), self._parent)
return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)
elif type == capnp.TYPE_UNKNOWN:
raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
else:
@ -3128,6 +3128,7 @@ cdef class SchemaParser:
self._last_import_array = importArray
ret = _ParsedSchema()
# TODO (HaaTa): Convert to parseFromDirectory() as per deprecation note
ret._init_child(self.thisptr.parseDiskFile(displayName, diskPath, importArray.asArrayPtr()))
return ret