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

arangodb / velocypack / 3998645281

pending completion
3998645281

Pull #148

github

GitHub
Merge b1e3c924b into 5a28b6413
Pull Request #148: use separate namespace for xxh functions

0 of 5107 relevant lines covered (0.0%)

0.0 hits per line

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

0.0
/src/Version.cpp
1
////////////////////////////////////////////////////////////////////////////////
2
/// DISCLAIMER
3
///
4
/// Copyright 2014-2020 ArangoDB GmbH, Cologne, Germany
5
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
6
///
7
/// Licensed under the Apache License, Version 2.0 (the "License");
8
/// you may not use this file except in compliance with the License.
9
/// You may obtain a copy of the License at
10
///
11
///     http://www.apache.org/licenses/LICENSE-2.0
12
///
13
/// Unless required by applicable law or agreed to in writing, software
14
/// distributed under the License is distributed on an "AS IS" BASIS,
15
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
/// See the License for the specific language governing permissions and
17
/// limitations under the License.
18
///
19
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
20
///
21
/// @author Max Neunhoeffer
22
/// @author Jan Steemann
23
////////////////////////////////////////////////////////////////////////////////
24

25
#include <sstream>
26

27
#include "velocypack/velocypack-common.h"
28
#include "velocypack/Version.h"
29

30
using namespace arangodb::velocypack;
31

32
Version const Version::BuildVersion(VELOCYPACK_VERSION_MAJOR,
33
                                    VELOCYPACK_VERSION_MINOR,
34
                                    VELOCYPACK_VERSION_PATCH);
35

36
std::string Version::toString() const {
×
37
  std::stringstream version;
×
38
  version << majorValue << "." << minorValue << "." << patchValue;
×
39
  return version.str();
×
40
}
41

42
int Version::compare(Version const& other) const {
×
43
  if (majorValue != other.majorValue) {
×
44
    return majorValue < other.majorValue ? -1 : 1;
×
45
  }
46
  if (minorValue != other.minorValue) {
×
47
    return minorValue < other.minorValue ? -1 : 1;
×
48
  }
49
  if (patchValue != other.patchValue) {
×
50
    return patchValue < other.patchValue ? -1 : 1;
×
51
  }
52
  return 0;
×
53
}
54

55
int Version::compare(Version const& lhs, Version const& rhs) {
×
56
  return lhs.compare(rhs);
×
57
}
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

© 2025 Coveralls, Inc