Skip to content

Commit

Permalink
apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan-rsm-McKenzie authored and github-actions[bot] committed Jun 18, 2023
1 parent d0c22e9 commit 938c6b5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions include/bsa/detail/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ namespace bsa::components
{
using result_t = decltype((**this)[std::forward<K>(a_key)]);
return (*this) ?
(**this)[std::forward<K>(a_key)] :
result_t{};
(**this)[std::forward<K>(a_key)] :
result_t{};
}

/// @}
Expand Down
8 changes: 4 additions & 4 deletions src/bsa/fo4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ namespace bsa::fo4
const auto find = [&](char a_ch) noexcept {
const auto pos = a_path.find_last_of(a_ch);
return pos != std::string_view::npos ?
std::optional{ pos } :
std::nullopt;
std::optional{ pos } :
std::nullopt;
};

split_t result;
Expand All @@ -204,8 +204,8 @@ namespace bsa::fo4

const auto first = pstem ? *pstem + 1 : 0;
const auto last = pextension ?
*pextension - first :
pextension.value_or(std::string_view::npos);
*pextension - first :
pextension.value_or(std::string_view::npos);
result.stem = a_path.substr(first, last);

return result;
Expand Down
30 changes: 15 additions & 15 deletions src/bsa/tes4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ namespace bsa::tes4
{
_endian =
this->xbox_archive() ?
std::endian::big :
std::endian::little;
std::endian::big :
std::endian::little;
}

std::uint32_t _version{ 0 };
Expand Down Expand Up @@ -236,9 +236,9 @@ namespace bsa::tes4
{
const auto dirStrSz =
a_header.directory_strings() ?
// include prefixed byte length
a_header.directory_names_length() + a_header.directory_count() :
0;
// include prefixed byte length
a_header.directory_names_length() + a_header.directory_count() :
0;

return offsetof_file_entries(a_header) +
dirStrSz +
Expand Down Expand Up @@ -557,8 +557,8 @@ namespace bsa::tes4
return ::compressBound(static_cast<::uLong>(this->size()));
case 104:
return a_codec == compression_codec::xmem ?
this->compress_bound_xmem() :
::compressBound(static_cast<::uLong>(this->size()));
this->compress_bound_xmem() :
::compressBound(static_cast<::uLong>(this->size()));
case 105:
assert(a_codec == compression_codec::normal);
return ::LZ4F_compressFrameBound(this->size(), &detail::lz4f_preferences);
Expand All @@ -579,8 +579,8 @@ namespace bsa::tes4
return this->compress_into_zlib(a_out);
case 104:
return a_codec == compression_codec::xmem ?
this->compress_into_xmem(a_out) :
this->compress_into_zlib(a_out);
this->compress_into_xmem(a_out) :
this->compress_into_zlib(a_out);
case 105:
assert(a_codec == compression_codec::normal);
return this->compress_into_lz4(a_out);
Expand Down Expand Up @@ -1113,7 +1113,7 @@ namespace bsa::tes4
const auto fname =
tableName ? *tableName :
embeddedName ? *embeddedName :
""sv;
""sv;

[[maybe_unused]] const auto [it, success] =
a_dir.insert(
Expand All @@ -1136,8 +1136,8 @@ namespace bsa::tes4
std::optional<std::size_t> decompsz;
const bool compressed =
a_size & file::icompression ?
!a_header.compressed() :
a_header.compressed();
!a_header.compressed() :
a_header.compressed();
if (compressed) {
std::tie(decompsz) = a_in->read<std::uint32_t>();
a_size -= 4;
Expand Down Expand Up @@ -1177,8 +1177,8 @@ namespace bsa::tes4

const auto tableName =
a_header.directory_strings() ?
std::make_optional(detail::read_bzstring(a_in)) :
std::nullopt;
std::make_optional(detail::read_bzstring(a_in)) :
std::nullopt;

directory d;
const auto embeddedName = this->read_file_entries(d, a_in, a_header, count, a_namesOffset);
Expand All @@ -1187,7 +1187,7 @@ namespace bsa::tes4
const auto dname =
tableName ? *tableName :
embeddedName ? *embeddedName :
""sv;
""sv;

[[maybe_unused]] const auto [it, success] =
this->insert(
Expand Down

0 comments on commit 938c6b5

Please sign in to comment.