]> git.tdb.fi Git - libs/gl.git/commitdiff
TexUnit's constructor shouldn't be public
authorMikko Rasa <tdb@tdb.fi>
Fri, 16 May 2014 18:39:46 +0000 (21:39 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 16 May 2014 18:39:46 +0000 (21:39 +0300)
source/texunit.cpp
source/texunit.h

index 714b65027d1786f03865bdfd22ab7d3851440f2b..fd36a4f15b5e77b7455af08ed4133f6e578c8c44 100644 (file)
@@ -82,7 +82,7 @@ TexUnit &TexUnit::get_unit(unsigned n)
        if(units.size()<=n)
        {
                unsigned i = units.size();
-               units.resize(n+1);
+               units.resize(n+1, TexUnit());
                for(; i<units.size(); ++i)
                        units[i].index = i;
        }
index 8962e63839cc6dd2f68113917396bf3816889056..9c4d93f6971ea5b60b10b78b367a60a81092a629 100644 (file)
@@ -24,9 +24,9 @@ private:
        static std::vector<TexUnit> units;
        static TexUnit *cur_unit;
 
-public:
        TexUnit();
 
+public:
        unsigned get_index() const { return index; }
        bool set_texture(const Texture *);
        const Texture *get_texture() const { return texture; }