mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 06:44:46 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user