Use #define instead of const char* for version.

You can't initialize strings in header files, because they might be included from several source files and the linker will see several copies of the same string.
This commit is contained in:
Jochen Topf 2013-08-26 10:30:39 +02:00
parent d9be2d1024
commit f84c2ea5e2
1 changed files with 2 additions and 3 deletions

View File

@ -7,10 +7,9 @@
// this describes the high-level OSM objects // this describes the high-level OSM objects
#include <osmpbf/osmformat.pb.h> #include <osmpbf/osmformat.pb.h>
namespace OSMPBF { #define OSMPBF_VERSION "1.3.0"
// library version namespace OSMPBF {
const char *version = "1.3.0";
// the maximum size of a blob header in bytes // the maximum size of a blob header in bytes
const int max_blob_header_size = 64 * 1024; // 64 kB const int max_blob_header_size = 64 * 1024; // 64 kB