Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - cire

Pages: 1 ... 8 9 [10]
General discussions / Re: Why RAII rocks
« on: October 10, 2012, 09:33:12 pm »
While it isn't significant, any smart pointer creates a tracking object; that is, an object (wrapper) to hold the raw pointer itself.

#include <iostream>
#include <memory>

int main()
    std::unique_ptr<int[]> pointer(new int[32]) ;

    std::cout << "Size of pointer: " << sizeof(pointer)
              << "\nSize of int*: " <<  sizeof (int*) << '\n' ;

Size of pointer: 4
Size of int*: 4

Gee.  Where did they hide that tracking object?

General discussions / Re: SFML 2.0 RC
« on: September 30, 2012, 03:49:26 am »
I don't know exactly what he meant there, either, unless he's paranoid enough to want protection against people casting away const, in which case -- good luck. 

General discussions / Re: SFML 2.0 RC
« on: September 29, 2012, 06:39:09 pm »
I believe Cekota was suggesting sfTransform_Identity be accessed through a function that supplies a copy of it.

Currently it's not constant and may be changed by a user, and subsequent uses of the identity will (silently) fail to act as one would expect.  The function would make similar scenarios less likely.

Pages: 1 ... 8 9 [10]