New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd: cleanup: use string & to avoid unnecessary copy #12336

Merged
merged 1 commit into from Dec 27, 2016

Conversation

Projects
None yet
3 participants
@wwformat
Contributor

wwformat commented Dec 6, 2016

Signed-off-by: Yunchuan Wen yunchuan.wen@kylin-cloud.com

@liewegas liewegas changed the title from cleanup: use string & to avoid unnecessary copy to osd: cleanup: use string & to avoid unnecessary copy Dec 6, 2016

@liewegas liewegas added this to the kraken milestone Dec 6, 2016

@liewegas liewegas added the needs-qa label Dec 6, 2016

@liewegas liewegas removed this from the kraken milestone Dec 7, 2016

string key = req->get_object_locator().key;
if (key.length() == 0)
key = req->get_oid().name;
const string &key = req->get_object_locator().key.length() ?

This comment has been minimized.

@tchaikov

tchaikov Dec 9, 2016

Contributor

nit, might want to use req->get_object_locator().key.empty() instead.

This comment has been minimized.

@wwformat

wwformat Dec 9, 2016

Contributor

You are right.

string key = req->get_object_locator().key;
if (key.length() == 0)
key = req->get_oid().name;
const string &key = req->get_object_locator().key.emtpy() ?

This comment has been minimized.

@tchaikov

tchaikov Dec 10, 2016

Contributor

s/emtpy/empty/

@tchaikov
/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-11.0.2-2400-g447cbf2/src/osd/PG.cc: In member function ‘bool PG::op_has_sufficient_caps(OpRequestRef&)’:
error: /srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-11.0.2-2400-g447cbf2/src/osd/PG.cc:1871:53: ‘const string’ has no member named ‘emtpy’
const string &key = req->get_object_locator().key.emtpy() ?
^
[ 62%] Building CXX object CMakeFiles/rocksdblib.dir/util/options.cc.o

http://gitbuilder.sepia.ceph.com/gitbuilder-ceph-deb-trusty-amd64-notcmalloc/log.cgi?log=447cbf246668697bcedd82bc174a54491c303402

cleanup: use string & to avoid unnecessary copy
Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
@wwformat

This comment has been minimized.

Contributor

wwformat commented Dec 10, 2016

s/emtpy/empty/

already updated....

@wwformat

This comment has been minimized.

Contributor

wwformat commented Dec 16, 2016

@tchaikov ping

@tchaikov tchaikov added the needs-qa label Dec 26, 2016

@liewegas liewegas merged commit 075325c into ceph:master Dec 27, 2016

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment