Sign in to follow this  

They called me crazy!

This topic is 662 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

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

This topic is 662 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this