Navigation Menu

Skip to content

Commit

Permalink
Use Grnxx::version() instead of GRNXX_VERSION.
Browse files Browse the repository at this point in the history
Because version.h is generated after the compilation of header.cpp.
  • Loading branch information
s-yata committed Jun 5, 2013
1 parent aaf6e61 commit 1978b5f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/grnxx/storage/header.cpp
Expand Up @@ -19,11 +19,10 @@

#include <cstring>

#include "grnxx/version.h"
#include "grnxx/grnxx.hpp"
#include "grnxx/storage.hpp"

#define GRNXX_STORAGE_HEADER_FORMAT "grnxx::Storage"
#define GRNXX_STORAGE_HEADER_VERSION GRNXX_VERSION

namespace grnxx {
namespace storage {
Expand Down Expand Up @@ -55,7 +54,7 @@ Header::Header()
data_mutex(MUTEX_UNLOCKED),
file_mutex(MUTEX_UNLOCKED),
reserved_2{} {
std::memcpy(version, GRNXX_STORAGE_HEADER_VERSION, HEADER_VERSION_SIZE);
std::strcpy(version, Grnxx::version());
for (size_t i = 0; i < NUM_IDLE_NODE_LISTS; ++i) {
oldest_idle_node_ids[i] = STORAGE_INVALID_NODE_ID;
}
Expand Down

0 comments on commit 1978b5f

Please sign in to comment.