~unity-api-team/unity-scopes-api/child-scopes-option

« back to all changes in this revision

Viewing changes to src/internal/ScopeObject.cpp

  • Committer: Michi Henning
  • Date: 2013-11-18 23:53:56 UTC
  • mto: This revision was merged to the branch mainline in revision 62.
  • Revision ID: michi.henning@canonical.com-20131118235356-mrsy51tyfiexbnp2
Replaced a bunch of calls to new with make_shared.

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
    try
89
89
    {
90
90
        // Instantiate the query ctrl and connect it to the middleware.
91
 
        QueryCtrlObject::SPtr co(new QueryCtrlObject);
 
91
        QueryCtrlObject::SPtr co(make_shared<QueryCtrlObject>());
92
92
        ctrl_proxy = mw_base->add_query_ctrl_object(co);
93
93
 
94
94
        // Instantiate the query. We tell it what the ctrl is so,
95
95
        // when the query completes, it can tell the ctrl object
96
96
        // to destroy itself.
97
 
        QueryObject::SPtr qo(new QueryObject(query_base, reply, ctrl_proxy));
 
97
        QueryObject::SPtr qo(make_shared<QueryObject>(query_base, reply, ctrl_proxy));
98
98
        MWQueryProxy query_proxy = mw_base->add_query_object(qo);
99
99
 
100
100
        // We tell the ctrl what the query facade is so, when cancel() is sent