mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
PBGitLane: remove functions with NSString arguments
We don't use these, so let's keep the class clean
This commit is contained in:
+5
-5
@@ -34,14 +34,14 @@ public:
|
||||
PBGitLane()
|
||||
{
|
||||
d_index = s_colorIndex++;
|
||||
//d_sha = NULL;
|
||||
}
|
||||
|
||||
bool isCommit(git_oid *sha) const;
|
||||
bool isCommit(NSString *sha) const;
|
||||
bool PBGitLane::isCommit(git_oid *sha) const
|
||||
{
|
||||
return !git_oid_cmp(&d_sha, sha);
|
||||
}
|
||||
|
||||
void setSha(git_oid sha);
|
||||
void setSha(NSString *sha);
|
||||
|
||||
git_oid const *sha() const
|
||||
{
|
||||
@@ -51,4 +51,4 @@ public:
|
||||
int index() const;
|
||||
|
||||
static void resetColors();
|
||||
};
|
||||
};
|
||||
@@ -24,24 +24,6 @@
|
||||
|
||||
int PBGitLane::s_colorIndex = 0;
|
||||
|
||||
static git_oid str_to_oid(NSString *str)
|
||||
{
|
||||
git_oid oid;
|
||||
git_oid_mkstr(&oid, [str UTF8String]);
|
||||
return oid;
|
||||
}
|
||||
|
||||
bool PBGitLane::isCommit(git_oid *sha) const
|
||||
{
|
||||
return !git_oid_cmp(&d_sha, sha);
|
||||
}
|
||||
|
||||
bool PBGitLane::isCommit(NSString *sha) const
|
||||
{
|
||||
git_oid a = str_to_oid(sha);
|
||||
return isCommit(&a);
|
||||
}
|
||||
|
||||
int PBGitLane::index() const
|
||||
{
|
||||
return d_index;
|
||||
@@ -52,12 +34,6 @@ void PBGitLane::setSha(git_oid sha)
|
||||
d_sha = sha;
|
||||
}
|
||||
|
||||
void PBGitLane::setSha(NSString *sha)
|
||||
{
|
||||
return setSha(str_to_oid(sha));
|
||||
}
|
||||
|
||||
|
||||
void PBGitLane::resetColors()
|
||||
{
|
||||
s_colorIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user