This commit is contained in:
parent
fbeb08156a
commit
9105b1ece6
10
deps/ox/src/ox/std/reader.cpp
vendored
10
deps/ox/src/ox/std/reader.cpp
vendored
@ -19,13 +19,13 @@ namespace ox {
|
||||
constexpr std::ios_base::seekdir sdMap(ox::ios_base::seekdir in) noexcept {
|
||||
switch (in) {
|
||||
case ox::ios_base::beg:
|
||||
return std::ios_base::seekdir::beg;
|
||||
return std::ios_base::beg;
|
||||
case ox::ios_base::end:
|
||||
return std::ios_base::seekdir::end;
|
||||
return std::ios_base::end;
|
||||
case ox::ios_base::cur:
|
||||
return std::ios_base::seekdir::cur;
|
||||
return std::ios_base::cur;
|
||||
}
|
||||
return std::ios_base::seekdir::beg;
|
||||
return std::ios_base::beg;
|
||||
}
|
||||
|
||||
ox::Result<char> StreamReader::peek() const noexcept {
|
||||
@ -48,7 +48,7 @@ ox::Result<std::size_t> StreamReader::read(char *v, std::size_t cnt) noexcept {
|
||||
|
||||
ox::Error StreamReader::seekg(std::size_t p) noexcept {
|
||||
try {
|
||||
m_strm.seekg(static_cast<long long int>(p), std::ios_base::seekdir::cur);
|
||||
m_strm.seekg(static_cast<long long int>(p), std::ios_base::cur);
|
||||
} catch (std::exception const&) {
|
||||
return OxError(1, "seekg failed");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user