From 5497189f2b27013ef27defb9e04e2f14682875dd Mon Sep 17 00:00:00 2001 From: scullin Date: Thu, 23 Apr 1998 19:10:35 +0000 Subject: [PATCH] Fixed non-virtual destructor, and incorrect stream usages that gcc didn't like. git-svn-id: svn://10.0.0.236/trunk@556 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/htmlparser/src/nsHTMLContentSink.cpp | 2 +- mozilla/htmlparser/src/nsToken.cpp | 3 ++- mozilla/htmlparser/src/nsToken.h | 2 +- mozilla/parser/htmlparser/src/nsHTMLContentSink.cpp | 2 +- mozilla/parser/htmlparser/src/nsToken.cpp | 3 ++- mozilla/parser/htmlparser/src/nsToken.h | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mozilla/htmlparser/src/nsHTMLContentSink.cpp b/mozilla/htmlparser/src/nsHTMLContentSink.cpp index d44be23f6c8..c7604f3145a 100644 --- a/mozilla/htmlparser/src/nsHTMLContentSink.cpp +++ b/mozilla/htmlparser/src/nsHTMLContentSink.cpp @@ -79,7 +79,7 @@ static void DebugDump(const char* str1,const nsString& str2,PRInt32 tabs) { for(PRInt32 i=0;i" << endl; + cout << str1 << cp << ">" << endl; delete cp; } #endif diff --git a/mozilla/htmlparser/src/nsToken.cpp b/mozilla/htmlparser/src/nsToken.cpp index b2924752845..0f0a169b69e 100644 --- a/mozilla/htmlparser/src/nsToken.cpp +++ b/mozilla/htmlparser/src/nsToken.cpp @@ -85,7 +85,8 @@ void CToken::DebugDumpToken(ostream& anOutputStream) { * @param ostream -- output stream to accept output data *------------------------------------------------------*/ void CToken::DebugDumpSource(ostream& anOutputStream) { - anOutputStream << mTextValue; + char buf[256]; + anOutputStream << mTextValue.ToCString(buf, 256); } /**------------------------------------------------------- diff --git a/mozilla/htmlparser/src/nsToken.h b/mozilla/htmlparser/src/nsToken.h index 61974290706..f75239f2dc1 100644 --- a/mozilla/htmlparser/src/nsToken.h +++ b/mozilla/htmlparser/src/nsToken.h @@ -53,7 +53,7 @@ class CScanner; class CToken { public: CToken(const nsString& aName); - ~CToken(); + virtual ~CToken(); virtual nsString& GetStringValue(void); virtual nsString& GetText(void); diff --git a/mozilla/parser/htmlparser/src/nsHTMLContentSink.cpp b/mozilla/parser/htmlparser/src/nsHTMLContentSink.cpp index d44be23f6c8..c7604f3145a 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLContentSink.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLContentSink.cpp @@ -79,7 +79,7 @@ static void DebugDump(const char* str1,const nsString& str2,PRInt32 tabs) { for(PRInt32 i=0;i" << endl; + cout << str1 << cp << ">" << endl; delete cp; } #endif diff --git a/mozilla/parser/htmlparser/src/nsToken.cpp b/mozilla/parser/htmlparser/src/nsToken.cpp index b2924752845..0f0a169b69e 100644 --- a/mozilla/parser/htmlparser/src/nsToken.cpp +++ b/mozilla/parser/htmlparser/src/nsToken.cpp @@ -85,7 +85,8 @@ void CToken::DebugDumpToken(ostream& anOutputStream) { * @param ostream -- output stream to accept output data *------------------------------------------------------*/ void CToken::DebugDumpSource(ostream& anOutputStream) { - anOutputStream << mTextValue; + char buf[256]; + anOutputStream << mTextValue.ToCString(buf, 256); } /**------------------------------------------------------- diff --git a/mozilla/parser/htmlparser/src/nsToken.h b/mozilla/parser/htmlparser/src/nsToken.h index 61974290706..f75239f2dc1 100644 --- a/mozilla/parser/htmlparser/src/nsToken.h +++ b/mozilla/parser/htmlparser/src/nsToken.h @@ -53,7 +53,7 @@ class CScanner; class CToken { public: CToken(const nsString& aName); - ~CToken(); + virtual ~CToken(); virtual nsString& GetStringValue(void); virtual nsString& GetText(void);