mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 14:27:34 +00:00
AK: Remove try_
prefix from FixedArray creation functions
This commit is contained in:
parent
909c2a73c4
commit
9c08bb9555
26 changed files with 57 additions and 59 deletions
|
@ -78,9 +78,9 @@ ErrorOr<NonnullRefPtr<Mesh>> WavefrontOBJLoader::load(Core::File& file)
|
|||
return Error::from_string_literal("Wavefront: Malformed face line.");
|
||||
}
|
||||
|
||||
auto vertex_indices = TRY(FixedArray<GLuint>::try_create(number_of_vertices));
|
||||
auto tex_coord_indices = TRY(FixedArray<GLuint>::try_create(number_of_vertices));
|
||||
auto normal_indices = TRY(FixedArray<GLuint>::try_create(number_of_vertices));
|
||||
auto vertex_indices = TRY(FixedArray<GLuint>::create(number_of_vertices));
|
||||
auto tex_coord_indices = TRY(FixedArray<GLuint>::create(number_of_vertices));
|
||||
auto normal_indices = TRY(FixedArray<GLuint>::create(number_of_vertices));
|
||||
|
||||
for (size_t i = 0; i < number_of_vertices; ++i) {
|
||||
auto vertex_parts = face_line.at(i).split_view('/', SplitBehavior::KeepEmpty);
|
||||
|
|
|
@ -124,7 +124,7 @@ void PlaybackManager::next_buffer()
|
|||
|
||||
m_resampler->reset();
|
||||
// FIXME: Handle OOM better.
|
||||
auto resampled = MUST(FixedArray<Audio::Sample>::try_create(m_resampler->resample(move(m_current_buffer)).span()));
|
||||
auto resampled = MUST(FixedArray<Audio::Sample>::create(m_resampler->resample(move(m_current_buffer)).span()));
|
||||
m_current_buffer.swap(resampled);
|
||||
MUST(m_connection->async_enqueue(m_current_buffer));
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
|
||||
ErrorOr<void> set_render_sample_count(size_t count)
|
||||
{
|
||||
auto new_buffer = TRY(FixedArray<float>::try_create(count));
|
||||
auto new_buffer = TRY(FixedArray<float>::create(count));
|
||||
m_render_buffer.swap(new_buffer);
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ static ErrorOr<void> run_command(DeprecatedString command, bool keep_open)
|
|||
arguments.append("-c"sv);
|
||||
arguments.append(command);
|
||||
}
|
||||
auto env = TRY(FixedArray<StringView>::try_create({ "TERM=xterm"sv, "PAGER=more"sv, "PATH="sv DEFAULT_PATH_SV }));
|
||||
auto env = TRY(FixedArray<StringView>::create({ "TERM=xterm"sv, "PAGER=more"sv, "PATH="sv DEFAULT_PATH_SV }));
|
||||
TRY(Core::System::exec(shell, arguments, Core::System::SearchInPath::No, env.span()));
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue