From bda90606f261208bd65ba27dfe769351e45139dd Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Tue, 25 Nov 2008 17:40:47 +0100 Subject: [PATCH] PBGitLane: remove functions with NSString arguments We don't use these, so let's keep the class clean --- PBGitLane.h | 10 +++++----- PBGitLane.mm | 24 ------------------------ 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/PBGitLane.h b/PBGitLane.h index 35dd133..4433d42 100644 --- a/PBGitLane.h +++ b/PBGitLane.h @@ -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(); -}; +}; \ No newline at end of file diff --git a/PBGitLane.mm b/PBGitLane.mm index 1e8218d..2ae767f 100644 --- a/PBGitLane.mm +++ b/PBGitLane.mm @@ -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;