susumu.yata
null+****@clear*****
Sat Dec 8 17:06:40 JST 2012
susumu.yata 2012-12-08 17:06:40 +0900 (Sat, 08 Dec 2012) New Revision: 1f0a87cab70d8369868a92388b6a3c4037b96a38 https://github.com/groonga/grnxx/commit/1f0a87cab70d8369868a92388b6a3c4037b96a38 Log: Use constexpr. Modified files: lib/db/vector.hpp Modified: lib/db/vector.hpp (+9 -9) =================================================================== --- lib/db/vector.hpp 2012-12-07 11:26:16 +0900 (a6b5172) +++ lib/db/vector.hpp 2012-12-08 17:06:40 +0900 (20cddad) @@ -23,17 +23,17 @@ namespace grnxx { namespace db { -const uint64_t VECTOR_MIN_PAGE_SIZE = uint64_t(1) << 0; -const uint64_t VECTOR_MAX_PAGE_SIZE = uint64_t(1) << 20; -const uint64_t VECTOR_DEFAULT_PAGE_SIZE = uint64_t(1) << 16; +constexpr uint64_t VECTOR_MIN_PAGE_SIZE = uint64_t(1) << 0; +constexpr uint64_t VECTOR_MAX_PAGE_SIZE = uint64_t(1) << 20; +constexpr uint64_t VECTOR_DEFAULT_PAGE_SIZE = uint64_t(1) << 16; -const uint64_t VECTOR_MIN_TABLE_SIZE = uint64_t(1) << 10; -const uint64_t VECTOR_MAX_TABLE_SIZE = uint64_t(1) << 20; -const uint64_t VECTOR_DEFAULT_TABLE_SIZE = uint64_t(1) << 12; +constexpr uint64_t VECTOR_MIN_TABLE_SIZE = uint64_t(1) << 10; +constexpr uint64_t VECTOR_MAX_TABLE_SIZE = uint64_t(1) << 20; +constexpr uint64_t VECTOR_DEFAULT_TABLE_SIZE = uint64_t(1) << 12; -const uint64_t VECTOR_MIN_SECONDARY_TABLE_SIZE = uint64_t(1) << 10; -const uint64_t VECTOR_MAX_SECONDARY_TABLE_SIZE = uint64_t(1) << 20; -const uint64_t VECTOR_DEFAULT_SECONDARY_TABLE_SIZE = uint64_t(1) << 12; +constexpr uint64_t VECTOR_MIN_SECONDARY_TABLE_SIZE = uint64_t(1) << 10; +constexpr uint64_t VECTOR_MAX_SECONDARY_TABLE_SIZE = uint64_t(1) << 20; +constexpr uint64_t VECTOR_DEFAULT_SECONDARY_TABLE_SIZE = uint64_t(1) << 12; extern class VectorCreate {} VECTOR_CREATE; extern class VectorOpen {} VECTOR_OPEN; -------------- next part -------------- HTML����������������������������... ダウンロード