Adds Defaults to UDim, Vector2, Vector3, UVector2

Issue #415 resolved
Former user created an issue

Automatic migration. Original reporter: "avengre"

Adds some defaults (ZERO, POSITIVE_X, NEGATIVE_X, etc) to

UDim, UVector2, Vector2, Vector3

Reproducibility: N/A

Comments (5)

  1. Martin Preisler

    Avengre has a point that it's a pain to write it over and over.

    The suggested pattern is as such: add commonly used static const constants with the following names: namespace CEGUI { static const Vector2f Vector2f_ZERO; }

    and some C++ file to contain these of course, probably Vector2.cpp

    EDIT: The final approach is to use methods and pass by copy to avoid linking duplications (all the methods are marked for inlining).

  2. Log in to comment