mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
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:
parent
8e82b900f4
commit
de56ca399a
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user