Changeset 4715

Show
Ignore:
Timestamp:
10/18/06 19:55:29 (2 years ago)
Author:
erijo
Message:

The last of the un-inlining de/constructors. There's still a lot of CPU_*, CPT_* and similar, small classes (in licq_packets.h) that don't have an explicit destructor and thus have an implicit default inline destructor. But I don't think this matters much since they proabably never change.

Location:
trunk/licq
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/include/licq_packets.h

    r4714 r4715  
    4343{ 
    4444public: 
    45     CPX_FileTransfer(ConstFileList &lFileList, const char *szFileName); 
    46  
    47     virtual ~CPX_FileTransfer(); 
    48  
    49     bool IsValid()  { return m_bValid; } 
    50     ConstFileList GetFileList() { return m_lFileList; } 
    51     const char *GetFilename()   { return m_szFilename; } 
    52     const char *GetDescription() { return m_szDesc; } 
    53     unsigned long GetFileSize() { return m_nFileSize; } 
    54  
    55 protected: 
    56     CPX_FileTransfer(); 
    57  
    58     bool                    m_bValid; 
    59     char                    *m_szDesc; 
    60     char                    *m_szFilename; 
    61     ConstFileList               m_lFileList; 
    62     unsigned long               m_nFileSize; 
     45  CPX_FileTransfer(ConstFileList &lFileList, const char *szFileName); 
     46  virtual ~CPX_FileTransfer(); 
     47 
     48  bool IsValid()    { return m_bValid; } 
     49  ConstFileList GetFileList()   { return m_lFileList; } 
     50  const char *GetFilename() { return m_szFilename; } 
     51  const char *GetDescription() { return m_szDesc; } 
     52  unsigned long GetFileSize()   { return m_nFileSize; } 
     53 
     54protected: 
     55  CPX_FileTransfer(); 
     56 
     57  bool          m_bValid; 
     58  char          *m_szDesc; 
     59  char          *m_szFilename; 
     60  ConstFileList m_lFileList; 
     61  unsigned long m_nFileSize; 
    6362}; 
    6463 
     
    7069{ 
    7170public: 
    72    virtual ~CPacket() { if (buffer != NULL) delete buffer; } 
     71   virtual ~CPacket(); 
    7372 
    7473   CBuffer *getBuffer()  { return buffer; }; 
     
    9695 
    9796protected: 
    98    CPacket() { buffer = NULL; }; 
     97   CPacket(); 
    9998 
    10099   CBuffer *buffer; 
     
    114113{ 
    115114public: 
     115  virtual ~CSrvPacketTcp(); 
     116 
    116117  // Packet details 
    117118  virtual const unsigned char  Channel()     { return m_nChannel; } 
     
    155156{ 
    156157public: 
     158   virtual ~CPacketUdp(); 
     159 
    157160   virtual CBuffer *Finalize(INetSocket *); 
    158161   virtual const unsigned short Sequence() { return m_nSequence; } 
     
    199202public: 
    200203  CPU_Logon(const char *_szPassword, const char *_szUin, unsigned short _nLogonStatus); 
     204  virtual ~CPU_Logon(); 
    201205protected: 
    202206  unsigned long  m_nLogonStatus; 
     
    209213public: 
    210214   CPU_Logoff(); 
     215   virtual ~CPU_Logoff(); 
    211216}; 
    212217 
     
    216221public: 
    217222  CPU_SendCookie(const char *, int len); 
     223  virtual ~CPU_SendCookie(); 
    218224}; 
    219225 
     
    223229public: 
    224230  CPU_CommonFamily(unsigned short Family, unsigned short SubType); 
     231  virtual ~CPU_CommonFamily(); 
    225232 
    226233protected: 
     
    231238{ 
    232239public: 
    233     CPU_GenericFamily(unsigned short Family, unsigned short SubType); 
    234  
     240  CPU_GenericFamily(unsigned short Family, unsigned short SubType); 
     241  virtual ~CPU_GenericFamily(); 
    235242}; 
    236243 
     
    268275public: 
    269276  CPU_Register(const char *_szPasswd); 
     277  virtual ~CPU_Register(); 
    270278}; 
    271279#elif ICQ_VERSION > 6 
     
    274282public: 
    275283  CPU_RegisterFirst(); 
     284  virtual ~CPU_RegisterFirst(); 
    276285}; 
    277286 
     
    280289public: 
    281290  CPU_Register(const char *_szPasswd); 
     291  virtual ~CPU_Register(); 
    282292}; 
    283293#endif 
     
    288298public: 
    289299  CPU_VerifyRegistration(); 
     300  virtual ~CPU_VerifyRegistration(); 
    290301}; 
    291302 
     
    295306public: 
    296307  CPU_SendVerification(const char *, const char *); 
     308  virtual ~CPU_SendVerification(); 
    297309}; 
    298310 
     
    371383public: 
    372384  CPU_AddPDINFOToServerList(); 
    373    
     385 
    374386  unsigned short GetSID()   { return m_nSID; } 
    375387  unsigned short GetGSID()  { return m_nGSID; } 
    376    
     388 
    377389protected: 
    378390  unsigned short m_nSID, 
     
    390402  unsigned short GetSID()   { return m_nSID; } 
    391403  unsigned short GetGSID()  { return m_nGSID; } 
    392    
     404 
    393405protected: 
    394406  unsigned short m_nSID, 
     
    407419class CPU_ClearServerList : public CPU_CommonFamily 
    408420{ 
    409  public: 
     421public: 
    410422  CPU_ClearServerList(UserStringList &, unsigned short); 
    411423}; 
     
    430442{ 
    431443public: 
    432    CPU_SetStatus(unsigned long _nNewStatus); 
     444  CPU_SetStatus(unsigned long _nNewStatus); 
    433445 
    434446private: 
    435    unsigned long m_nNewStatus; 
     447  unsigned long m_nNewStatus; 
    436448}; 
    437449 
     
    439451{ 
    440452public: 
    441    CPU_SetStatusFamily(); 
    442  
    443 protected: 
    444    void InitBuffer(); 
    445    unsigned long m_nNewStatus; 
     453  CPU_SetStatusFamily(); 
     454 
     455protected: 
     456  void InitBuffer(); 
     457  unsigned long m_nNewStatus; 
    446458}; 
    447459 
     
    752764public: 
    753765  CPU_FileTransfer(ICQUser *, ConstFileList &lFileList, const char *_szFile, 
    754            const char *_szDesc, unsigned short nLevel, bool bICBM); 
     766                   const char *_szDesc, unsigned short nLevel, bool bICBM); 
    755767}; 
    756768 
     
    837849  CPU_InfoPluginListResp(ICQUser *u, unsigned long nMsgID1, 
    838850                         unsigned long nMsgID2, unsigned short nSequence); 
    839  
    840851}; 
    841852 
     
    11021113public: 
    11031114  CPU_Meta_SetAbout(const char *szAbout); 
    1104   ~CPU_Meta_SetAbout(); 
     1115  virtual ~CPU_Meta_SetAbout(); 
    11051116  virtual const unsigned short SubCommand()  { return m_nMetaCommand; } 
    11061117protected: 
     
    11351146protected: 
    11361147  unsigned short m_nMetaCommand; 
    1137      
    1138     char *m_szPassword; 
    1139      
     1148  char *m_szPassword; 
     1149 
    11401150friend class CICQDaemon; 
    11411151}; 
     
    11671177public: 
    11681178  CPU_Meta_RequestAllInfo(const char *_szId); 
    1169   virtual ~CPU_Meta_RequestAllInfo() { free(m_szId); } 
     1179  virtual ~CPU_Meta_RequestAllInfo(); 
    11701180  virtual const unsigned short SubCommand()  { return m_nMetaCommand; } 
    11711181  const char *Id()  {  return m_szId; } 
     
    11811191public: 
    11821192  CPU_Meta_RequestBasicInfo(const char *_szId); 
    1183   virtual ~CPU_Meta_RequestBasicInfo() { free(m_szId); } 
     1193  virtual ~CPU_Meta_RequestBasicInfo(); 
    11841194  virtual const unsigned short SubCommand()  { return m_nMetaCommand; } 
    11851195  const char *Id()  {  return m_szId; } 
     
    12771287  unsigned long SessionId() { return m_nSessionId; } 
    12781288  unsigned long Id() { return m_nId; } 
    1279    
     1289 
    12801290protected: 
    12811291  char m_nHandshake; 
     
    13531363   bool           m_bPluginReq; 
    13541364   size_t         m_nMsgLen; 
    1355     
     1365 
    13561366   char *m_szLocalPortOffset; 
    13571367   unsigned short m_nLevel; 
     
    14531463  CPT_Ack(unsigned short _nSubCommand, unsigned short _nSequence, 
    14541464     bool _bAccept, bool _bUrgent, ICQUser *_cUser); 
     1465  virtual ~CPT_Ack(); 
    14551466}; 
    14561467 
  • trunk/licq/src/icqpacket.cpp

    r4714 r4715  
    287287} 
    288288 
     289CSrvPacketTcp::~CSrvPacketTcp() 
     290{ 
     291  // Empty 
     292} 
     293 
    289294CBuffer *CSrvPacketTcp::Finalize(INetSocket *) 
    290295{ 
     
    499504unsigned short CPacket::s_nLocalPort = 0; 
    500505char CPacket::s_nMode = MODE_DIRECT; 
     506 
     507CPacket::CPacket() : buffer(NULL) 
     508{ 
     509  // Empty 
     510} 
     511 
     512CPacket::~CPacket() 
     513{ 
     514  delete buffer; 
     515} 
    501516 
    502517//----SetIps----------------------------------------------------------------- 
     
    574589} 
    575590 
     591CPacketUdp::~CPacketUdp() 
     592{ 
     593  // Empty 
     594} 
    576595 
    577596void CPacketUdp::InitBuffer() 
     
    655674} 
    656675 
     676CPU_Register::~CPU_Register() 
     677{ 
     678  // Empty 
     679} 
     680 
    657681#elif ICQ_VERSION >= 7 
    658682 
     
    671695 
    672696  buffer->PackUnsignedLongBE(1); 
     697} 
     698 
     699CPU_RegisterFirst::~CPU_RegisterFirst() 
     700{ 
     701  // Empty 
    673702} 
    674703 
     
    695724} 
    696725 
     726CPU_Register::~CPU_Register() 
     727{ 
     728  // Empty 
     729} 
     730 
    697731#endif 
    698732 
     
    703737   
    704738  InitBuffer(); 
     739} 
     740 
     741CPU_VerifyRegistration::~CPU_VerifyRegistration() 
     742{ 
     743  // Empty 
    705744} 
    706745 
     
    732771} 
    733772 
     773CPU_SendVerification::~CPU_SendVerification() 
     774{ 
     775  // Empty 
     776} 
     777 
    734778//-----Logon-------------------------------------------------------------------- 
    735779CPU_Logon::CPU_Logon(const char *szPassword, const char *szUin, unsigned short _nLogonStatus) 
     
    798842} 
    799843 
     844CPU_Logon::~CPU_Logon() 
     845{ 
     846  // Empty 
     847} 
     848 
    800849//-----SendCookie------------------------------------------------------------ 
    801850CPU_SendCookie::CPU_SendCookie(const char *szCookie, int nLen) 
     
    811860  buffer->PackUnsignedLongBE(0x00000001); 
    812861  buffer->PackTLV(0x0006, nLen, szCookie); 
     862} 
     863 
     864CPU_SendCookie::~CPU_SendCookie() 
     865{ 
     866  // Empty 
    813867} 
    814868 
     
    11571211} 
    11581212 
     1213CPU_GenericFamily::~CPU_GenericFamily() 
     1214{ 
     1215  // Empty 
     1216} 
     1217 
    11591218CPU_CommonFamily::CPU_CommonFamily(unsigned short Family, unsigned short SubType) 
    11601219  : CSrvPacketTcp(ICQ_CHNxDATA) 
     
    11641223  m_nFamily = Family; 
    11651224  m_nSubType = SubType; 
     1225} 
     1226 
     1227CPU_CommonFamily::~CPU_CommonFamily() 
     1228{ 
     1229  // Empty 
    11661230} 
    11671231 
     
    25042568} 
    25052569 
     2570CPU_Logoff::~CPU_Logoff() 
     2571{ 
     2572  // Empty 
     2573} 
     2574 
    25062575//-----RequestList-------------------------------------------------------------- 
    25072576CPU_RequestList::CPU_RequestList() 
     
    40094078} 
    40104079 
     4080CPU_Meta_RequestAllInfo::~CPU_Meta_RequestAllInfo() 
     4081{ 
     4082  free(m_szId); 
     4083} 
    40114084 
    40124085//-----Meta_RequestInfo------------------------------------------------------ 
     
    40284101  buffer->PackUnsignedShort(m_nSubSequence); 
    40294102  buffer->PackUnsignedLong(strtoul(m_szId, (char **)NULL, 10)); 
     4103} 
     4104 
     4105CPU_Meta_RequestBasicInfo::~CPU_Meta_RequestBasicInfo() 
     4106{ 
     4107  free(m_szId); 
    40304108} 
    40314109 
     
    49235001} 
    49245002 
     5003CPT_Ack::~CPT_Ack() 
     5004{ 
     5005  // Empty 
     5006} 
    49255007 
    49265008//-----AckGeneral---------------------------------------------------------------