This is one patch that I won't be adding, because I want the code to work even with older compilers that might not understand "const_char" ( or even templates).

        Ross.
----------
Sent from my jesusPhone


On Jul 8, 2008, at 9:03 AM, Erik Hovland <[EMAIL PROTECTED]> wrote:

In C++ it is preferred to control constness by using const_cast instead
of the C casting syntax. This patch does that in a couple of places.

E

---

liveMedia/QuickTimeGenericRTPSource.cpp |    2 +-
liveMedia/SimpleRTPSource.cpp           |    2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/liveMedia/QuickTimeGenericRTPSource.cpp b/liveMedia/ QuickTimeGenericRTPSource.cpp
index eff16ea..4bbe5d3 100644
--- a/liveMedia/QuickTimeGenericRTPSource.cpp
+++ b/liveMedia/QuickTimeGenericRTPSource.cpp
@@ -74,7 +74,7 @@ QuickTimeGenericRTPSource

QuickTimeGenericRTPSource::~QuickTimeGenericRTPSource() {
  delete[] qtState.sdAtom;
-  delete[] (char*)fMIMEtypeString;
+  delete[] const_cast<char*>(fMIMEtypeString);
}

Boolean QuickTimeGenericRTPSource
diff --git a/liveMedia/SimpleRTPSource.cpp b/liveMedia/ SimpleRTPSource.cpp
index fcfdfb5..d41fe0b 100644
--- a/liveMedia/SimpleRTPSource.cpp
+++ b/liveMedia/SimpleRTPSource.cpp
@@ -49,7 +49,7 @@ SimpleRTPSource
}

SimpleRTPSource::~SimpleRTPSource() {
-  delete[] (char*)fMIMEtypeString;
+  delete[] const_cast<char*>(fMIMEtypeString);
}

Boolean SimpleRTPSource

--
Erik Hovland
mail: [EMAIL PROTECTED]
web: http://hovland.org/
PGP/GPG public key available on request

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to