Skip to content

Commit bda9060

Browse files
committed
PBGitLane: remove functions with NSString arguments
We don't use these, so let's keep the class clean
1 parent b4c2a4f commit bda9060

File tree

2 files changed

+5
-29
lines changed

2 files changed

+5
-29
lines changed

Diff for: PBGitLane.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ class PBGitLane {
3434
PBGitLane()
3535
{
3636
d_index = s_colorIndex++;
37-
//d_sha = NULL;
3837
}
3938

40-
bool isCommit(git_oid *sha) const;
41-
bool isCommit(NSString *sha) const;
39+
bool PBGitLane::isCommit(git_oid *sha) const
40+
{
41+
return !git_oid_cmp(&d_sha, sha);
42+
}
4243

4344
void setSha(git_oid sha);
44-
void setSha(NSString *sha);
4545

4646
git_oid const *sha() const
4747
{
@@ -51,4 +51,4 @@ class PBGitLane {
5151
int index() const;
5252

5353
static void resetColors();
54-
};
54+
};

Diff for: PBGitLane.mm

-24
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,6 @@
2424

2525
int PBGitLane::s_colorIndex = 0;
2626

27-
static git_oid str_to_oid(NSString *str)
28-
{
29-
git_oid oid;
30-
git_oid_mkstr(&oid, [str UTF8String]);
31-
return oid;
32-
}
33-
34-
bool PBGitLane::isCommit(git_oid *sha) const
35-
{
36-
return !git_oid_cmp(&d_sha, sha);
37-
}
38-
39-
bool PBGitLane::isCommit(NSString *sha) const
40-
{
41-
git_oid a = str_to_oid(sha);
42-
return isCommit(&a);
43-
}
44-
4527
int PBGitLane::index() const
4628
{
4729
return d_index;
@@ -52,12 +34,6 @@ static git_oid str_to_oid(NSString *str)
5234
d_sha = sha;
5335
}
5436

55-
void PBGitLane::setSha(NSString *sha)
56-
{
57-
return setSha(str_to_oid(sha));
58-
}
59-
60-
6137
void PBGitLane::resetColors()
6238
{
6339
s_colorIndex = 0;

0 commit comments

Comments
 (0)