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

View File

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