refactor!: use named arguments if there is more than one

This commit is contained in:
Aleksey Kulikov 2021-09-30 18:04:36 +03:00
parent ec80ad3dd4
commit 5f7fdf4bd3
66 changed files with 1920 additions and 1136 deletions

View file

@ -7,13 +7,18 @@ import '../util.dart';
/// Determine if an object can be found in the object database by an abbreviated object ID.
///
/// Throws a [LibGit2Error] if error occured.
Pointer<git_oid> existsPrefix(
Pointer<git_odb> db,
Pointer<git_oid> shortOid,
int len,
) {
Pointer<git_oid> existsPrefix({
required Pointer<git_odb> odbPointer,
required Pointer<git_oid> shortOidPointer,
required int length,
}) {
final out = calloc<git_oid>();
final error = libgit2.git_odb_exists_prefix(out, db, shortOid, len);
final error = libgit2.git_odb_exists_prefix(
out,
odbPointer,
shortOidPointer,
length,
);
if (error < 0) {
throw LibGit2Error(libgit2.git_error_last());