diff options
| author | Liam Mitchell <[email protected]> | 2026-03-09 18:40:40 -0700 |
|---|---|---|
| committer | Liam Mitchell <[email protected]> | 2026-03-09 18:40:40 -0700 |
| commit | 97aa4e5c48305647a5d8f09da5f24bc1ce5540f3 (patch) | |
| tree | 11062e72f4342aeb2f16ac19d6af20ac0e4acd78 /src/zenremotestore/partialblockrequestmode.cpp | |
| parent | Merge branch 'main' into lm/oidctoken-exe-path (diff) | |
| parent | updated chunk–block analyser (#818) (diff) | |
| download | zen-97aa4e5c48305647a5d8f09da5f24bc1ce5540f3.tar.xz zen-97aa4e5c48305647a5d8f09da5f24bc1ce5540f3.zip | |
Merge branch 'main' into lm/oidctoken-exe-path
Diffstat (limited to 'src/zenremotestore/partialblockrequestmode.cpp')
| -rw-r--r-- | src/zenremotestore/partialblockrequestmode.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/zenremotestore/partialblockrequestmode.cpp b/src/zenremotestore/partialblockrequestmode.cpp new file mode 100644 index 000000000..b3edf515b --- /dev/null +++ b/src/zenremotestore/partialblockrequestmode.cpp @@ -0,0 +1,27 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#include <zenremotestore/partialblockrequestmode.h> + +#include <zencore/string.h> + +namespace zen { + +EPartialBlockRequestMode +PartialBlockRequestModeFromString(const std::string_view ModeString) +{ + switch (HashStringAsLowerDjb2(ModeString)) + { + case HashStringDjb2("false"): + return EPartialBlockRequestMode::Off; + case HashStringDjb2("zencacheonly"): + return EPartialBlockRequestMode::ZenCacheOnly; + case HashStringDjb2("mixed"): + return EPartialBlockRequestMode::Mixed; + case HashStringDjb2("true"): + return EPartialBlockRequestMode::All; + default: + return EPartialBlockRequestMode::Invalid; + } +} + +} // namespace zen |