mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor(merge): change the size of allocation
This commit is contained in:
parent
50a6087a5b
commit
0176b66ba7
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ Pointer<git_oid> mergeBaseMany({
|
|||
required List<git_oid> commits,
|
||||
}) {
|
||||
final out = calloc<git_oid>();
|
||||
final commitsC = calloc<git_oid>(commits.length * 20);
|
||||
final commitsC = calloc<git_oid>(commits.length);
|
||||
for (var i = 0; i < commits.length; i++) {
|
||||
commitsC[i].id = commits[i].id;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ Pointer<git_oid> mergeBaseOctopus({
|
|||
required List<git_oid> commits,
|
||||
}) {
|
||||
final out = calloc<git_oid>();
|
||||
final commitsC = calloc<git_oid>(commits.length * 20);
|
||||
final commitsC = calloc<git_oid>(commits.length);
|
||||
for (var i = 0; i < commits.length; i++) {
|
||||
commitsC[i].id = commits[i].id;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue