Merge commit '0c6dee4befebf823d839d1092bcae79afbf4f12e' into merge/libosmium-2.11.0

This commit is contained in:
Michael Krasnyk
2017-01-20 14:05:21 +01:00
231 changed files with 2732 additions and 1500 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
+2 -2
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
@@ -67,7 +67,7 @@ namespace osmium {
}
inline size_t get_max_queue_size(const char* queue_name, size_t default_value) noexcept {
std::string name {"OSMIUM_MAX_"};
std::string name{"OSMIUM_MAX_"};
name += queue_name;
name += "_QUEUE_SIZE";
const char* env = getenv(name.c_str());
+1 -1
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
+3 -3
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
@@ -67,10 +67,10 @@ namespace osmium {
#endif
assert(len > 0 && len < max_double_length);
while (buffer[len-1] == '0') {
while (buffer[len - 1] == '0') {
--len;
}
if (buffer[len-1] == '.') {
if (buffer[len - 1] == '.') {
--len;
}
+4 -2
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
@@ -35,7 +35,9 @@ DEALINGS IN THE SOFTWARE.
// Windows is only available for little endian architectures
// http://stackoverflow.com/questions/6449468/can-i-safely-assume-that-windows-installations-will-always-be-little-endian
#if !defined(_WIN32) && !defined(__APPLE__)
#if defined(__FreeBSD__)
# include <sys/endian.h>
#elif !defined(_WIN32) && !defined(__APPLE__)
# include <endian.h>
#else
# define __LITTLE_ENDIAN 1234
+1 -1
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
+1 -1
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
+4 -5
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
@@ -42,18 +42,17 @@ namespace osmium {
class MemoryUsage {
int m_current = 0;
int m_peak = 0;
int m_peak = 0;
#ifdef __linux__
static int parse_number(const std::string& line) {
const auto f = line.find_first_of("0123456789");
const auto l = line.find_last_of("0123456789");
return std::atoi(line.substr(f, l-f+1).c_str());
return std::atoi(line.substr(f, l - f + 1).c_str());
}
#endif
public:
/**
* Get the memory usage for the current process. The constructor will
* get the memory usage. Use the current() and peak() calls to access
@@ -69,7 +68,7 @@ namespace osmium {
if (status_file.is_open()) {
std::string line;
while (! status_file.eof() ) {
while (!status_file.eof()) {
std::getline(status_file, line);
if (line.substr(0, 6) == "VmPeak") {
m_peak = parse_number(line);
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
@@ -94,14 +94,15 @@ namespace osmium {
*/
class MemoryMapping {
public:
public:
enum class mapping_mode {
readonly = 0,
write_private = 1,
write_shared = 2
};
private:
private:
/// The size of the mapping
size_t m_size;
+3 -3
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
@@ -39,7 +39,7 @@ namespace osmium {
template <typename T>
inline T min_op_start_value() {
return std::numeric_limits<T>::max();
return std::numeric_limits<T>::max();
}
/**
@@ -78,7 +78,7 @@ namespace osmium {
template <typename T>
inline T max_op_start_value() {
return std::numeric_limits<T>::min();
return std::numeric_limits<T>::min();
}
/**
+2 -2
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
@@ -41,7 +41,7 @@ namespace osmium {
* Like std::tie(), but takes its arguments as const references. Used
* as a helper function when sorting.
*/
template<typename... Ts>
template <typename... Ts>
inline std::tuple<const Ts&...>
const_tie(const Ts&... args) noexcept {
return std::tuple<const Ts&...>(args...);
+1 -1
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
+1 -1
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
+1 -1
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
+1 -1
View File
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
@@ -5,7 +5,7 @@
This file is part of Osmium (http://osmcode.org/libosmium).
Copyright 2013-2016 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2017 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003