Remove some explicit (Mutable)ArrayRef constructions (#4238)

Rely on implicit conversion in call sites and initialization.

Removing the explicit conversions is only code simplication.
Moving from `auto x = Y(z)` to `Y x = z;` helps ensure that only
implicit constructors/conversions are happening (whereas the prior
syntax allows explicit conversions) which can help with readability
since implicit conversions are generally "less
complex"/risky/attention-requiring.
This commit is contained in:
David Blaikie
2024-08-22 19:40:54 +00:00
committed by GitHub
parent ea8ad22a17
commit 5a11048c34
3 changed files with 9 additions and 11 deletions
@@ -122,7 +122,7 @@ static auto BuildBenchMetadata() -> llvm::ArrayRef<BenchMetadata> {
for (ssize_t g_index : llvm::seq<ssize_t>(0, BenchSize)) {
// Start by filling the group with random bytes.
auto group_bytes = llvm::MutableArrayRef(
llvm::MutableArrayRef group_bytes(
&metadata_storage[bm_index][g_index * GroupSize], GroupSize);
for (uint8_t& b : group_bytes) {
b = absl::Uniform<uint8_t>(gen) | MetadataGroup::PresentMask;