From b1153b0f1454c9e1b33ac65ca70e08e33200a507 Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Mon, 27 Mar 2006 01:26:42 +0000 Subject: [PATCH] remove unused GetUnreversedHostname function (bug 331795) r=brettw git-svn-id: svn://10.0.0.236/trunk@193024 18797224-902f-48f8-a5cc-f745e15eee43 --- .../components/places/src/nsNavHistory.cpp | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/mozilla/browser/components/places/src/nsNavHistory.cpp b/mozilla/browser/components/places/src/nsNavHistory.cpp index 26277f653e5..64b52ed6744 100644 --- a/mozilla/browser/components/places/src/nsNavHistory.cpp +++ b/mozilla/browser/components/places/src/nsNavHistory.cpp @@ -130,8 +130,6 @@ static void GetSubstringFromNthDot(const nsCString& aInput, PRInt32 aStartingSpo static nsresult GenerateTitleFromURI(nsIURI* aURI, nsAString& aTitle); static PRInt32 GetTLDCharCount(const nsCString& aHost); static PRInt32 GetTLDType(const nsCString& aHostTail); -static void GetUnreversedHostname(const nsString& aBackward, - nsAString& aForward); static PRBool IsNumericHostName(const nsCString& aHost); static PRInt64 GetSimpleBookmarksQueryFolder( const nsCOMArray& aQueries); @@ -3850,36 +3848,6 @@ GetReversedHostname(const nsString& aForward, nsAString& aRevHost) } -// GetUnreversedHostname -// -// This takes a reversed hostname as above and converts it to a -// "regular" hostname with no dot at the beginning. -// -// Input: -// gor.allizom. -// Output -// mozilla.org -// -// See GetReversedHostname() above - -void -GetUnreversedHostname(const nsString& aBackward, nsAString& aForward) -{ - NS_ASSERTION(! aBackward.IsEmpty() && aBackward[aBackward.Length()-1] == '.', - "Malformed reversed hostname with no trailing dot"); - - aForward.Truncate(0); - if (! aBackward.IsEmpty() && aBackward[aBackward.Length()-1] == '.') { - // copy everything except the trailing dot - for (PRInt32 i = aBackward.Length() - 2; i >= 0; i -- ) - aForward.Append(aBackward[i]); - } else { - NS_WARNING("Malformed reversed host name: no trailing dot"); - ReverseString(aBackward, aForward); - } -} - - // IsNumericHostName // // For host-based groupings, numeric IPs should not be collapsed by the