Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3362


Ignore:
Timestamp:
Jul 29, 2009, 5:09:09 PM (15 years ago)
Author:
rgrieder
Message:

Moved ScopeGuard c'tors from protected to public section in order to use them as class members too (destruction order is defined by the reversed member declaration order).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/util/ScopeGuard.h

    r3280 r3362  
    124124        }
    125125
    126     protected:
    127126        ScopeGuardImpl0(F fun) : fun_(fun)
    128127        {}
    129128
     129    protected:
    130130        F fun_;
    131131    };
     
    171171        }
    172172
    173     protected:
    174173        ScopeGuardImpl1(F fun, P1 p1) : fun_(fun), p1_(p1)
    175174        {}
    176175
     176    protected:
    177177        F fun_;
    178178        const P1 p1_;
     
    219219        }
    220220
    221     protected:
    222221        ScopeGuardImpl2(F fun, P1 p1, P2 p2) : fun_(fun), p1_(p1), p2_(p2)
    223222        {}
    224223
     224    protected:
    225225        F fun_;
    226226        const P1 p1_;
     
    268268        }
    269269
    270     protected:
    271270        ScopeGuardImpl3(F fun, P1 p1, P2 p2, P3 p3) : fun_(fun), p1_(p1), p2_(p2), p3_(p3)
    272271        {}
    273272
     273    protected:
    274274        F fun_;
    275275        const P1 p1_;
     
    319319        }
    320320
    321     protected:
    322321        ScopeGuardImpl4( F fun, P1 p1, P2 p2, P3 p3, P4 p4 ) :
    323322             fun_( fun ), p1_( p1 ), p2_( p2 ), p3_( p3 ), p4_( p4 )
    324323        {}
    325324
     325    protected:
    326326        F fun_;
    327327        const P1 p1_;
     
    372372        }
    373373
    374     protected:
    375374        ScopeGuardImpl5( F fun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5 ) :
    376375             fun_( fun ), p1_( p1 ), p2_( p2 ), p3_( p3 ), p4_( p4 ), p5_( p5 )
    377376        {}
    378377
     378    protected:
    379379        F fun_;
    380380        const P1 p1_;
     
    426426        }
    427427
    428     protected:
    429428        ObjScopeGuardImpl0(Obj& obj, MemFun memFun) : obj_(obj), memFun_(memFun)
    430429        {}
    431430
     431    protected:
    432432        Obj& obj_;
    433433        MemFun memFun_;
     
    488488        }
    489489
    490     protected:
    491490        ObjScopeGuardImpl1(Obj& obj, MemFun memFun, P1 p1) : obj_(obj), memFun_(memFun), p1_(p1)
    492491        {}
    493492       
     493    protected:
    494494        Obj& obj_;
    495495        MemFun memFun_;
     
    551551        }
    552552
    553     protected:
    554553        ObjScopeGuardImpl2(Obj& obj, MemFun memFun, P1 p1, P2 p2) : obj_(obj), memFun_(memFun), p1_(p1), p2_(p2)
    555554        {}
    556555
     556    protected:
    557557        Obj& obj_;
    558558        MemFun memFun_;
     
    616616        }
    617617
    618     protected:
    619618        ObjScopeGuardImpl3( Obj & obj, MemFun memFun, P1 p1, P2 p2, P3 p3 ) :
    620619             obj_( obj ), memFun_( memFun ), p1_( p1 ), p2_( p2 ), p3_( p3 )
    621620        {}
    622621
     622    protected:
    623623        Obj& obj_;
    624624        MemFun memFun_;
Note: See TracChangeset for help on using the changeset viewer.