Commit f107438e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove dead code and inline trivial getters

parent 54e848b9
......@@ -155,12 +155,9 @@ Broadcast::~Broadcast()
int Broadcast::Send(Message* m, const struct sockaddr *dst, socklen_t len)
{
/* Create the final message */
m->CreateFinalMessage();
/* Get the message and the length */
uint8_t* message = m->GetFinalMessage();
unsigned int length = m->GetFinalMessageLen();
size_t length = m->GetFinalMessageLen();
if(message==NULL)
{
......
......@@ -156,11 +156,3 @@ bool Message::AddProgram(Program *p)
return true;
}
void Message::CreateFinalMessage(void)
{
}
uint8_t* Message::GetFinalMessage(){return msg;}
unsigned int Message::GetFinalMessageLen(){return msg_len;}
/*****************************************************************************
* message.h : SAP Message Class definition
****************************************************************************
* Copyright (C) 1998-2003 VideoLAN
* Copyright (C) 1998-2006 VideoLAN
* $Id$
*
* Authors: Damien Lucas <nitrox@videolan.org>
* Rémi Denis-Courmont <rem # videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -29,16 +30,15 @@
#define SAP_IPV6 6
class Message {
public:
Message(char message_type, uint16_t version, const char* ip);
~Message();
bool AddProgram(Program*);
void CreateFinalMessage();
uint8_t* GetFinalMessage();
unsigned int GetFinalMessageLen();
private:
uint8_t* msg; // final message
size_t msg_len;
uint16_t version;
public:
Message(char message_type, uint16_t version, const char* ip);
~Message();
bool AddProgram(Program*);
uint8_t* GetFinalMessage(void) { return msg; }
size_t GetFinalMessageLen(void) { return msg_len; }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment