Re: foddex - r21842 - in abiword-plugins/branches/abicollab-packet-rewrite/tools/abicollab: backends/xp core/packet/xp

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Fri Aug 24 2007 - 22:14:48 CEST

Aren't "uninitialized" UTF8Strings initially "empty"? What does this
patch do other than obfuscate the change history?

On 8/24/07, cvs@abisource.com <cvs@abisource.com> wrote:
>
> Author: foddex
> Date: 2007-08-24 22:12:40 +0200 (Fri, 24 Aug 2007)
> New Revision: 21842
>
> Modified:
> abiword-plugins/branches/abicollab-packet-rewrite/tools/abicollab/backends/xp/SessionEvent.h
> abiword-plugins/branches/abicollab-packet-rewrite/tools/abicollab/core/packet/xp/AbiCollab_Packet.h
> Log:
> Several uninitialized UT_UTF8String related problems fixed
>
> Modified: abiword-plugins/branches/abicollab-packet-rewrite/tools/abicollab/backends/xp/SessionEvent.h
> ===================================================================
> --- abiword-plugins/branches/abicollab-packet-rewrite/tools/abicollab/backends/xp/SessionEvent.h 2007-08-24 14:55:22 UTC (rev 21841)
> +++ abiword-plugins/branches/abicollab-packet-rewrite/tools/abicollab/backends/xp/SessionEvent.h 2007-08-24 20:12:40 UTC (rev 21842)
> @@ -47,7 +47,7 @@
> {
> public:
> DECLARE_PACKET(JoinSessionEvent);
> - JoinSessionEvent() {}
> + JoinSessionEvent() : m_sSessionId("") {}
> JoinSessionEvent(const UT_UTF8String& sessionId)
> : m_sSessionId(sessionId)
> {
> @@ -73,9 +73,12 @@
> {
> public:
> DECLARE_PACKET(JoinSessionRequestResponseEvent);
> - JoinSessionRequestResponseEvent() {}
> + JoinSessionRequestResponseEvent() : m_sDocumentName(""), m_sDocumentId(""), m_sSessionId("") {}
> JoinSessionRequestResponseEvent(const UT_UTF8String& sessionId)
> : m_sSessionId(sessionId)
> + , m_iRev(0)
> + , m_sDocumentName("")
> + , m_sDocumentId("")
> {
> UT_ASSERT(m_sSessionId != "");
> }
> @@ -96,7 +99,7 @@
> {
> public:
> DECLARE_PACKET(DisjoinSessionEvent);
> - DisjoinSessionEvent() {}
> + DisjoinSessionEvent() : m_sSessionId("") {}
> DisjoinSessionEvent(const UT_UTF8String& sessionId)
> : m_sSessionId(sessionId)
> {
> @@ -114,7 +117,7 @@
> {
> public:
> DECLARE_PACKET(CloseSessionEvent);
> - CloseSessionEvent() {}
> + CloseSessionEvent() : m_sSessionId("") {}
> CloseSessionEvent(const UT_UTF8String& sessionId)
> : m_sSessionId(sessionId)
> {
>
> Modified: abiword-plugins/branches/abicollab-packet-rewrite/tools/abicollab/core/packet/xp/AbiCollab_Packet.h
> ===================================================================
> --- abiword-plugins/branches/abicollab-packet-rewrite/tools/abicollab/core/packet/xp/AbiCollab_Packet.h 2007-08-24 14:55:22 UTC (rev 21841)
> +++ abiword-plugins/branches/abicollab-packet-rewrite/tools/abicollab/core/packet/xp/AbiCollab_Packet.h 2007-08-24 20:12:40 UTC (rev 21842)
> @@ -196,7 +196,7 @@
> DECLARE_ABSTRACT_PACKET(SessionPacket);
> DECLARE_SERIALIZABLE_PACKET;
>
> - SessionPacket() {}
> + SessionPacket() : m_sSessionId("") {}
> SessionPacket(const UT_UTF8String& sSessionId);
>
> virtual PacketType getType() const
> @@ -255,7 +255,7 @@
> {
> public:
> DECLARE_PACKET(ChangeRecordSessionPacket);
> - ChangeRecordSessionPacket() : m_cType(PX_ChangeRecord::PXType(0)), m_crType(PacketSessionType(0)) {}
> + ChangeRecordSessionPacket() : m_cType(PX_ChangeRecord::PXType(0)), m_crType(PacketSessionType(0)), m_sDocUUID(""), m_sText("") {}
> ChangeRecordSessionPacket(
> const UT_UTF8String& sSessionId,
> PX_ChangeRecord::PXType cType,
> @@ -322,7 +322,7 @@
> class ABI_EXPORT InsertSpan_ChangeRecordSessionPacket : public ChangeRecordSessionPacket {
> public:
> DECLARE_PACKET(InsertSpan_ChangeRecordSessionPacket);
> - InsertSpan_ChangeRecordSessionPacket() {}
> + InsertSpan_ChangeRecordSessionPacket() : m_sText("") {}
> InsertSpan_ChangeRecordSessionPacket(
> const UT_UTF8String& sSessionId,
> PX_ChangeRecord::PXType cType,
> @@ -332,6 +332,7 @@
> int iPos,
> PacketSessionType crType)
> : ChangeRecordSessionPacket( sSessionId, cType, sDocUUID, iRev, iRemoteRev, iPos, crType )
> + , m_sText("")
> {}
>
> // XXX: make proper setters/getters when done!
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
>

-- 
Counting bodies like sheep to the rhythm of the war drums.
Received on Fri Aug 24 22:15:10 2007

This archive was generated by hypermail 2.1.8 : Fri Aug 24 2007 - 22:15:10 CEST