Advertisement Jump to content
Sign in to follow this  
dsm1891

They called me crazy!

This topic is 1062 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

This reminds me of S_FAIL for some reason.  You may have succeeded, but in the end, its still a failure.

Edited by ferrous

Share this post


Link to post
Share on other sites
Actual (sanitized) quote from actual game source I've worked on:

#define NET_ERR_UNEXPECTED_SUCCESS                      DEF_ERROR(NET_ERR_BASE + 3)

Share this post


Link to post
Share on other sites

Actual (sanitized) quote from actual game source I've worked on:
 

#define NET_ERR_UNEXPECTED_SUCCESS                      DEF_ERROR(NET_ERR_BASE + 3)

 

Unexpected success, aye? To me, that sounds like an issue that only Guild Wars 2 would encounter smile.png

Share this post


Link to post
Share on other sites

washu wrote me this :)

struct beufint_t {
public:
    beufint_t () : t(et::n), u(0) {}
    beufint_t (bool b) : t(et::b), b(b) {}
    beufint_t (float f) : t(et::f), f(f) {}
    beufint_t (int i) : t(et::i), i(i) {}
    beufint_t (unsigned u) : t(et::u), u(u) {}
    
    operator bool () const { return t == et::b ? b : false; }
    operator int () const { return t == et::i ? i : 0; }
    operator float () const { return t == et::f ? f : 0; }
    operator unsigned () const { return t == et::u ? u : 0; }
    operator void const * () const { return t != et::n ? this : 0; }

    bool operator () (bool) const { return t == et::b; }
    bool operator () (int) const { return t == et::i; }
    bool operator () (float) const { return t == et::f; }
    bool operator () (unsigned) const { return t == et::u; }
private:
    enum class et {
        b,
        f,
        i,
        u,
        n
    };
    
    union {
        bool b;
        float f;
        int i;
        unsigned u;
    };
    
    et t;
};

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!