contrib: use constexpr for kFileMaxSize

Use constexpr to inform compiler that it is possible to evaluate
variable at compile time.
This commit is contained in:
Mariusz Zaborski 2022-03-06 06:12:01 -05:00
parent 8e82b900f4
commit de56ca399a
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@
#include "contrib/c-blosc/sandboxed.h"
static const size_t kFileMaxSize = 1024 * 1024 * 1024; // 1GB
constexpr size_t kFileMaxSize = 1024 * 1024 * 1024; // 1GB
std::streamsize GetStreamSize(std::ifstream& stream) {
stream.seekg(0, std::ios_base::end);

View File

@ -18,7 +18,7 @@
#include "contrib/zstd/sandboxed.h"
static const size_t kFileMaxSize = 1024 * 1024 * 1024; // 1GB
constexpr size_t kFileMaxSize = 1024 * 1024 * 1024; // 1GB
std::streamsize GetStreamSize(std::ifstream& stream) {
stream.seekg(0, std::ios_base::end);