Jump to content
  • Advertisement

Deventer

Member
  • Content Count

    119
  • Joined

  • Last visited

Community Reputation

263 Neutral

About Deventer

  • Rank
    Member
  1. Deventer

    deleting const type*

    If the pointer to the resource is non-const, it will call the non-const member function which returns a non-const pointer to the data which you can call your safe delete on. If the pointer to the resource is const it will still call the const member function. Deleting it would be an error unless you cast away const. Casting away const should be used judiciously, you may be breaking a contract in your public interface. const T * data = constResource->getData( ); // calls: const T * getData( ) const; T * data = resource->getData( ); // calls: T * getData( ); T * data = constResource->getData( ); // Error: Invalid conversion of 'const T *' to 'T *'
  2. Deventer

    deleting const type*

    What about overloading on const? const T * getData( ) const; T * getData( );
  3. Deventer

    VS2005 Output Setting

    How about a post-build step that copies the file to the second location?
  4. Deventer

    Mac OS X: Way better than I expected

    Keyboard Page Up and Page Down on a notebook are: Fn + Up Arrow, Fn + Down Arrow, Home and End are Fn + Left Arrow and Fn + Right Arrow respectively. For some reason on keyboards from late 2007, they removed the text from the arrow keys to indicate that they had that feature. Similarly, Fn + Delete does what you would expect a delete on a Windows keyboard to do. With regards to the second mouse button on the trackpad, the late 2008 model aluminium notebooks all support this by clicking on the right hand side of the trackpad. Since about the last of the PPC notebooks, you've been able to enable an option to do a secondary click by resting two fingers on the trackpad and clicking the button. I've been using this method so long now it's second nature. As for their peripherals, I've never really had a problem with them. I'm not a huge fan of the mighty mouse, but we've had one (and only one) on our late '07 iMac and it's still going strong. I wouldn't buy one for a machine that didn't come with one though. :)
  5. Deventer

    Low-cost Mac development setup

    Yes, software like the iPhone SDK. ;)
  6. Deventer

    Low-cost Mac development setup

    Yeah, make sure it's an Intel machine.
  7. Deventer

    Header file issue?

    It wouldn't have worked when you put it in the header, there was no translation unit actually being compiled that included Objects.h. :) Edit: Please don't edit out the original question from a post. It makes it hard for people to understand what all our replies are about. :(
  8. Deventer

    VS Team Suite Free?

    I would read these thoroughly. FAQ BizSpark Startup Agreement BizSpark Program End User License Agreement (EULA) I'm going to check this out myself. Sounds interesting. Thanks for posting this! :)
  9. Sounds like an STL implementation detail. I don't think the IDE would make a difference here, you would need to switch STL implementations instead. The IDEs are probably just making use of the compiler and libraries already on your system, rather than providing their own.
  10. With single argument constructors, or constructors that can be called with a single argument, yes, I would 99.9% of the time use the explicit keyword. I would have preferred if explicit were the default and that there was an implicit keyword instead. :)
  11. Yeah, you have provided your own constructor so it won't generate a default one. What you do want to be careful of with your example is that it allows implicit conversions. e.g. ClassName a = 10; ClassName b( false ); Both compile without any errors because they are implicitly converted to calls to the constructor taking a single int. explicit ClassName( int a ); Would prevent that from happening. The same is true for any constructor taking a single parameter (or where there are multiple parameters with default values).
  12. Deventer

    VS 2008 SP1 now available

    Quote:Original post by joe1024 I`ve got a C2D and 1 GB RAM, but VS2005 is unusable on my rig. You type faster than it manages to write into source code, not even mentioning stalls here and there. And constant swapping doesn`t help either. I wonder if FIX: The Visual Studio 2005 IDE stops responding when you work with Visual C++ projects would have helped the situation. Certainly makes things a lot more pleasant for me. Previously on a rather large project I worked on, I had to disable Intellisense for the very reason you mentioned, though I only had a single core machine and one of my colleagues with a dual core didn't have this problem.
  13. Deventer

    [c++ VS2005] Weird warning

    Quote:Original post by Cambo_frog Quote:Original post by Deventer It does apply because std::vector< unsigned int > and std::vector< size_t > would generate the same code. The compiler uses the first occurrence it comes across, so vec_size is being treated as a std::vector< unsigned int > and so the compiler warns. :) (Read the commentary after the first example in the Microsoft document). That's possible Deventer, but I wonder why the warning disappears when compiling under vs2008? Because they made it smarter... Or the user is building for 64bit... Or they have 64bit portability warnings turned off...
  14. Deventer

    [c++ VS2005] Weird warning

    It does apply because std::vector< unsigned int > and std::vector< size_t > would generate the same code. The compiler uses the first occurrence it comes across, so vec_size is being treated as a std::vector< unsigned int > and so the compiler warns. :) (Read the commentary after the first example in the Microsoft document).
  15. Deventer

    Requesting peer review of 3D Vector class.

    Anonymous unions are ok in C++. Anonymous structs however are not. :) The Microsoft Visual C++ warning for this does mention something along the lines of non-standard extension used: anonymous struct/union. Though it doesn't actually emit this message for anonymous unions.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!