Skip to content

Commit 7ca3908

Browse files
committed
Use int over bool
1 parent 728fe60 commit 7ca3908

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/worktree.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ SEXP R_git_worktree_list(SEXP ptr) {
4141
SEXP R_git_worktree_exists(SEXP ptr, SEXP name) {
4242
git_repository *repo = get_git_repository(ptr);
4343
git_worktree *worktree = NULL;
44-
const bool exists = git_worktree_lookup(&worktree, repo, CHAR(STRING_ELT(name, 0))) == GIT_OK;
44+
const int exists = git_worktree_lookup(&worktree, repo, CHAR(STRING_ELT(name, 0))) == GIT_OK;
4545
git_worktree_free(worktree);
4646
return Rf_ScalarLogical(exists);
4747
}
@@ -62,7 +62,7 @@ SEXP R_git_worktree_is_valid(SEXP ptr, SEXP name) {
6262
git_repository *repo = get_git_repository(ptr);
6363
git_worktree *worktree = NULL;
6464
bail_if(git_worktree_lookup(&worktree, repo, CHAR(STRING_ELT(name, 0))), "git_worktree_lookup");
65-
const bool valid = git_worktree_validate(worktree) == GIT_OK;
65+
const int valid = git_worktree_validate(worktree) == GIT_OK;
6666
git_worktree_free(worktree);
6767
return Rf_ScalarLogical(valid);
6868
}
@@ -80,7 +80,7 @@ SEXP R_git_worktree_is_locked(SEXP ptr, SEXP name) {
8080
git_worktree *worktree = NULL;
8181
bail_if(git_worktree_lookup(&worktree, repo, CHAR(STRING_ELT(name, 0))), "git_worktree_lookup");
8282
git_buf *reason_for_being_locked = NULL;
83-
const bool locked = git_worktree_is_locked(reason_for_being_locked, worktree) > 0;
83+
const int locked = git_worktree_is_locked(reason_for_being_locked, worktree) > 0;
8484
git_worktree_free(worktree);
8585
return Rf_ScalarLogical(locked);
8686
}
@@ -199,7 +199,7 @@ SEXP R_git_worktree_is_prunable(
199199
if (LOGICAL_ELT(prune_locked, 0)) {
200200
opts.flags |= GIT_WORKTREE_PRUNE_LOCKED;
201201
}
202-
const bool prunable = git_worktree_is_prunable(worktree, &opts) == 1;
202+
const int prunable = git_worktree_is_prunable(worktree, &opts) == 1;
203203
git_worktree_free(worktree);
204204
return Rf_ScalarLogical(prunable);
205205
}

0 commit comments

Comments
 (0)