]> git.tdb.fi Git - libs/gl.git/blob - source/core/backend.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / core / backend.cpp
1 #include <msp/strings/lexicalcast.h>
2 #include <msp/strings/utils.h>
3 #include "backend.h"
4
5 using namespace std;
6
7 namespace Msp {
8 namespace GL {
9
10 Version::Version(unsigned short a, unsigned short i)
11 {
12         major = a;
13         minor = i;
14 }
15
16 Version::Version(const string &s)
17 {
18         vector<string> parts = split(s, '.');
19         major = lexical_cast<unsigned>(parts[0]);
20         minor = lexical_cast<unsigned>(parts[1]);
21 }
22
23 bool Version::operator>=(const Version &other) const
24 {
25         return major>other.major || (major==other.major && minor>=other.minor);
26 }
27
28 } // namespace GL
29 } // namespace Msp