]> git.tdb.fi Git - libs/gl.git/commitdiff
Simplify version comparisons
authorMikko Rasa <tdb@tdb.fi>
Sun, 10 Sep 2017 12:32:26 +0000 (15:32 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 10 Sep 2017 12:32:26 +0000 (15:32 +0300)
The less-than operator was implemented a while ago but these two cases
were missed.

source/extension.cpp

index c543328b6550236819bbcb727440e3178cc9bf6e..a095986123dd535d192881c2870649ae8e936e43 100644 (file)
@@ -201,7 +201,7 @@ inline Version _get_gl_version()
        if(const char *force_ver_ptr = getenv("MSPGL_FORCE_VERSION"))
        {
                Version force_ver(force_ver_ptr);
-               if(!(force_ver>=ver))
+               if(force_ver<ver)
                        ver = force_ver;
        }
 
@@ -229,7 +229,7 @@ inline Version _get_glsl_version()
        if(const char *force_ver_ptr = getenv("MSPGL_FORCE_GLSL_VERSION"))
        {
                Version force_ver(force_ver_ptr);
-               if(!(force_ver>=ver))
+               if(force_ver<ver)
                        ver = force_ver;
        }