-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
for best perf prefer unique_ptr over shared_ptr
- Loading branch information
Dane Springmeyer
committed
Apr 4, 2016
1 parent
85cba87
commit f8e60ab
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f8e60ab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @flippmoke -
shared_ptr
should be fast enough that we'd never be able to proveunique_ptr
is faster in this case. However usingunique_ptr
prevents copies which caught that the shared pointers were being copied (and therefore unnecessarily reference counted) in the for loop.f8e60ab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, total brain fade: these obviously need to be shared_ptr to be convertible to
mapnik::datasource_ptr
. Ticketed getting tests that actually ensure this file compiles at #192. Reverted in 0c724f1