VirtualBox

Changeset 36529 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 4, 2011 1:54:13 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70953
Message:

iprt::non_copyable -> RTCNonCopyable (now in utils.h), moved and renamed RTMemAutoPtr et al out of iprt/mem.h.

Location:
trunk/src/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp

    r33540 r36529  
    3131#include <iprt/string.h>
    3232#ifndef VBOX_VBGLR3_XFREE86
    33 # include <iprt/mem.h>
     33# include <iprt/cpp/mem.h>
    3434#endif
    3535#include <iprt/assert.h>
     
    607607{
    608608    /* Create the handle. */
    609     RTMemAutoPtr<VBGLR3GUESTPROPENUM, VbglR3GuestPropEnumFree> Handle;
     609    RTCMemAutoPtr<VBGLR3GUESTPROPENUM, VbglR3GuestPropEnumFree> Handle;
    610610    Handle = (PVBGLR3GUESTPROPENUM)RTMemAllocZ(sizeof(VBGLR3GUESTPROPENUM));
    611611    if (!Handle)
     
    618618
    619619    /* Pack the pattern array */
    620     RTMemAutoPtr<char> Patterns;
     620    RTCMemAutoPtr<char> Patterns;
    621621    Patterns = (char *)RTMemAlloc(cchPatterns);
    622622    size_t off = 0;
     
    632632     * information. */
    633633    uint32_t cchBuf = 4096;
    634     RTMemAutoPtr<char> Buf;
     634    RTCMemAutoPtr<char> Buf;
    635635
    636636    /* In reading the guest property data we are racing against the host
  • trunk/src/VBox/Additions/x11/VBoxClient/VBoxClient.h

    r30681 r36529  
    2626/** A simple class describing a service.  VBoxClient will run exactly one
    2727 * service per invocation. */
    28 class Service : public iprt::non_copyable
     28class Service : public RTCNonCopyable
    2929{
    3030public:
  • trunk/src/VBox/HostServices/GuestControl/service.cpp

    r35035 r36529  
    150150 * Class containing the shared information service functionality.
    151151 */
    152 class Service : public iprt::non_copyable
     152class Service : public RTCNonCopyable
    153153{
    154154private:
  • trunk/src/VBox/HostServices/GuestProperties/service.cpp

    r33540 r36529  
    147147 * Class containing the shared information service functionality.
    148148 */
    149 class Service : public iprt::non_copyable
     149class Service : public RTCNonCopyable
    150150{
    151151private:
  • trunk/src/VBox/Runtime/testcase/tstMemAutoPtr.cpp

    r31157 r36529  
    11/* $Id$ */
    22/** @file
    3  * IPRT - Testcase the RTMemAutoPtr template.
     3 * IPRT - Testcase the RTCMemAutoPtr template.
    44 */
    55
     
    2828*   Header Files                                                               *
    2929*******************************************************************************/
    30 #include <iprt/mem.h>
     30#include <iprt/cpp/mem.h>
    3131#include <iprt/stream.h>
    3232#include <iprt/initterm.h>
     
    6161extern "C" int tstMemAutoPtrDisas1(void **ppv)
    6262{
    63     RTMemAutoPtr<TSTMEMAUTOPTRSTRUCT> Handle(1);
     63    RTCMemAutoPtr<TSTMEMAUTOPTRSTRUCT> Handle(1);
    6464    if (!Handle)
    6565    {
     
    135135     */
    136136    {
    137         RTMemAutoPtr<char> NilObj;
     137        RTCMemAutoPtr<char> NilObj;
    138138        CHECK_EXPR(!NilObj);
    139139        CHECK_EXPR(NilObj.get() == NULL);
     
    143143
    144144    {
    145         RTMemAutoPtr<char> Alloc(10);
     145        RTCMemAutoPtr<char> Alloc(10);
    146146        CHECK_EXPR(Alloc.get() != NULL);
    147147        char *pch = Alloc.release();
     
    149149        CHECK_EXPR(Alloc.get() == NULL);
    150150
    151         RTMemAutoPtr<char> Manage(pch);
     151        RTCMemAutoPtr<char> Manage(pch);
    152152        CHECK_EXPR(Manage.get() == pch);
    153153        CHECK_EXPR(&Manage[0] == pch);
     
    161161     */
    162162    {
    163         RTMemAutoPtr<char, RTMemEfAutoFree<char>, RTMemEfReallocNP> Electric(10);
     163        RTCMemAutoPtr<char, RTCMemEfAutoFree<char>, RTMemEfReallocNP> Electric(10);
    164164        CHECK_EXPR(Electric.get() != NULL);
    165165        Electric[0] = '0';
     
    178178    g_cFrees = 0;
    179179    {
    180         RTMemAutoPtr<char, tstMemAutoPtrDestructorCounter, RTMemEfReallocNP> FreeIt(128);
     180        RTCMemAutoPtr<char, tstMemAutoPtrDestructorCounter, RTMemEfReallocNP> FreeIt(128);
    181181        FreeIt[127] = '0';
    182182    }
     
    185185    g_cFrees = 0;
    186186    {
    187         RTMemAutoPtr<char, tstMemAutoPtrDestructorCounter, RTMemEfReallocNP> FreeIt2(128);
     187        RTCMemAutoPtr<char, tstMemAutoPtrDestructorCounter, RTMemEfReallocNP> FreeIt2(128);
    188188        FreeIt2[127] = '1';
    189189        FreeIt2.reset();
     
    196196    g_cFrees = 0;
    197197    {
    198         RTMemAutoPtr<char, tstMemAutoPtrDestructorCounter, RTMemEfReallocNP> DontFreeIt(256);
     198        RTCMemAutoPtr<char, tstMemAutoPtrDestructorCounter, RTMemEfReallocNP> DontFreeIt(256);
    199199        DontFreeIt[255] = '0';
    200200        RTMemEfFreeNP(DontFreeIt.release());
     
    204204    g_cFrees = 0;
    205205    {
    206         RTMemAutoPtr<char, tstMemAutoPtrDestructorCounter, RTMemEfReallocNP> FreeIt3(128);
     206        RTCMemAutoPtr<char, tstMemAutoPtrDestructorCounter, RTMemEfReallocNP> FreeIt3(128);
    207207        FreeIt3[127] = '0';
    208208        CHECK_EXPR(FreeIt3.realloc(128));
     
    219219    g_cFrees = 0;
    220220    {
    221         RTMemAutoPtr<char, tstMemAutoPtrDestructorCounter, RTMemEfReallocNP> FreeIt4;
     221        RTCMemAutoPtr<char, tstMemAutoPtrDestructorCounter, RTMemEfReallocNP> FreeIt4;
    222222        CHECK_EXPR(FreeIt4.alloc(123));
    223223        CHECK_EXPR(FreeIt4.realloc(543));
     
    231231     */
    232232    {
    233         RTMemAutoPtr<TSTMEMAUTOPTRSTRUCT> Struct1(1);
     233        RTCMemAutoPtr<TSTMEMAUTOPTRSTRUCT> Struct1(1);
    234234        Struct1->a = 0x11223344;
    235235        Struct1->b = 0x55667788;
     
    266266     */
    267267    {
    268         RTMemAutoPtr<uint64_t, RTMemAutoDestructor<uint64_t>, tstMemAutoPtrAllocatorNoZero> Zeroed1(1, true);
     268        RTCMemAutoPtr<uint64_t, RTCMemAutoDestructor<uint64_t>, tstMemAutoPtrAllocatorNoZero> Zeroed1(1, true);
    269269        CHECK_EXPR(*Zeroed1 == 0);
    270270    }
    271271
    272272    {
    273         RTMemAutoPtr<uint64_t, RTMemAutoDestructor<uint64_t>, tstMemAutoPtrAllocatorNoZero> Zeroed2;
     273        RTCMemAutoPtr<uint64_t, RTCMemAutoDestructor<uint64_t>, tstMemAutoPtrAllocatorNoZero> Zeroed2;
    274274        Zeroed2.alloc(5, true);
    275275        CHECK_EXPR(Zeroed2[0] == 0);
  • trunk/src/VBox/Storage/testcase/VDIoRnd.cpp

    r35596 r36529  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VBox HDD container test utility - I/O data generator.
    44 */
     
    1515 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1616 */
     17
    1718#define LOGGROUP LOGGROUP_DEFAULT
    1819#include <iprt/log.h>
     
    2021#include <iprt/mem.h>
    2122#include <iprt/rand.h>
     23#include <iprt/assert.h>
    2224
    2325#include "VDIoRnd.h"
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette