• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OpenLightingProject / ola / 24609073669

18 Apr 2026 04:36PM UTC coverage: 44.864% (-0.9%) from 45.72%
24609073669

push

github

web-flow
Merge pull request #2043 from peternewman/nortle-ftdi

Revert some stuff via 146cf26 which accidentally snuck into #1999 by mistake

8554 of 19846 branches covered (43.1%)

22105 of 49271 relevant lines covered (44.86%)

48.53 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/common/base/Version.cpp
1
/*
2
 * This library is free software; you can redistribute it and/or
3
 * modify it under the terms of the GNU Lesser General Public
4
 * License as published by the Free Software Foundation; either
5
 * version 2.1 of the License, or (at your option) any later version.
6
 *
7
 * This library is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10
 * Lesser General Public License for more details.
11
 *
12
 * You should have received a copy of the GNU Lesser General Public
13
 * License along with this library; if not, write to the Free Software
14
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15
 *
16
 * Version.cpp
17
 * Provides version information for all of OLA.
18
 * Copyright (C) 2014 Peter Newman
19
 */
20

21
#include "ola/base/Version.h"
22

23
#include <sstream>
24
#include <string>
25

26
namespace ola {
27
namespace base {
28

29
using std::string;
30

31
unsigned int Version::GetMajor() {
×
32
  return OLA_VERSION_MAJOR;
×
33
}
34

35
unsigned int Version::GetMinor() {
×
36
  return OLA_VERSION_MINOR;
×
37
}
38

39
unsigned int Version::GetRevision() {
×
40
  return OLA_VERSION_REVISION;
×
41
}
42

43
string Version::GetBuildName() {
×
44
  return OLA_BUILD_NAME;
×
45
}
46

47
string Version::GetVersion() {
×
48
  std::ostringstream str;
×
49
  str << GetMajor() << "." << GetMinor() << "." << GetRevision();
×
50
  return str.str();
×
51
}
×
52

53
bool Version::IsAtLeast(unsigned int major,
×
54
                        unsigned int minor,
55
                        unsigned int revision) {
56
  return (
×
57
      GetMajor() >= major &&
×
58
      GetMinor() >= minor &&
×
59
      GetRevision() >= revision);
×
60
}
61
}  // namespace base
62
}  // namespace ola
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc