Skip to content

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented Dec 5, 2019

Summary of changes

Optimise SharedPtr by giving it move constructor and assignment operator.

Documentation

None


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

@ciarmcom ciarmcom requested review from a team December 5, 2019 16:00
@ciarmcom
Copy link
Member

ciarmcom commented Dec 5, 2019

@kjbracey-arm, thank you for your changes.
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@mbed-ci
Copy link

mbed-ci commented Dec 6, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 6, 2019

Errors in the build, [Error] main.cpp@68,15: [Pe309]: more than one instance of constructor "mbed::SharedPtr<T>::SharedPtr [with T=TestStruct]" matches the argument list:

@0xc0170 0xc0170 added the release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0 label Dec 6, 2019
@kjbracey
Copy link
Contributor Author

kjbracey commented Dec 9, 2019

Okay, I need to split this. I forgot there was the SharedPtr(nullptr_t) addition in here, which breaks people doing ptr = NULL or ptr = 0. That bit can follow the Callback changes - its NULL cleanup should cover it.

Optimise SharedPtr by giving it move constructor and assignment
operator.
@adbridge
Copy link
Contributor

@pan- @0xc0170 please review updates

@mbed-ci
Copy link

mbed-ci commented Jan 3, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@0xc0170 0xc0170 merged commit 222d31c into ARMmbed:master Jan 9, 2020
@adbridge
Copy link
Contributor

@kjbracey-arm is this all internal or technically a change in functionality ? Ie is this really a patch update ?

@kjbracey
Copy link
Contributor Author

It's a refactor. Optimising existing copy operations to move when possible, rather than adding any new API.

@kjbracey kjbracey deleted the sharedptr_move branch February 17, 2020 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants