mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor!: use named arguments if there is more than one
This commit is contained in:
parent
ec80ad3dd4
commit
5f7fdf4bd3
66 changed files with 1920 additions and 1136 deletions
|
@ -12,7 +12,7 @@ class RefLog with IterableMixin<RefLogEntry> {
|
|||
RefLog(Reference ref) {
|
||||
final repo = ref.owner;
|
||||
final name = ref.name;
|
||||
_reflogPointer = bindings.read(repo.pointer, name);
|
||||
_reflogPointer = bindings.read(repoPointer: repo.pointer, name: name);
|
||||
}
|
||||
|
||||
/// Pointer to memory address for allocated reflog object.
|
||||
|
@ -23,7 +23,10 @@ class RefLog with IterableMixin<RefLogEntry> {
|
|||
/// Requesting the reflog entry with an index of 0 (zero) will return
|
||||
/// the most recently created entry.
|
||||
RefLogEntry operator [](int index) {
|
||||
return RefLogEntry(bindings.getByIndex(_reflogPointer, index));
|
||||
return RefLogEntry(bindings.getByIndex(
|
||||
reflogPointer: _reflogPointer,
|
||||
index: index,
|
||||
));
|
||||
}
|
||||
|
||||
/// Releases memory allocated for reflog object.
|
||||
|
@ -70,7 +73,10 @@ class _RefLogIterator implements Iterator<RefLogEntry> {
|
|||
if (_index == _count) {
|
||||
return false;
|
||||
} else {
|
||||
_currentEntry = RefLogEntry(bindings.getByIndex(_reflogPointer, _index));
|
||||
_currentEntry = RefLogEntry(bindings.getByIndex(
|
||||
reflogPointer: _reflogPointer,
|
||||
index: _index,
|
||||
));
|
||||
_index++;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue