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

Use const, fix warnings

parent 5281ae07
......@@ -59,24 +59,24 @@ bool Program::IsPermanent(void){return permanent;}
bool Program::IsRTP(void){return b_rtp;}
bool Program::HasPlGroup(void){return b_has_pl_group;}
void Program::SetName(char* n){name=n;}
void Program::SetUser(char* u){user=u;}
void Program::SetMachine(char* m){machine=m;}
void Program::SetSite(char* s){site=s;}
void Program::SetAddress(char* a){address=a;}
void Program::SetPlGroup(char *h){pl_group=h;}
void Program::SetName(const char* n){name=n;}
void Program::SetUser(const char* u){user=u;}
void Program::SetMachine(const char* m){machine=m;}
void Program::SetSite(const char* s){site=s;}
void Program::SetAddress(const char* a){address=a;}
void Program::SetPlGroup(const char *h){pl_group=h;}
void Program::SetRTP(bool b){b_rtp = b;}
void Program::SetHasPlGroup(bool b){b_has_pl_group = b ;}
void Program::SetPort(char* p)
void Program::SetPort(const char* p)
{
int i_port=atoi(p);
char psz_port[12];
sprintf(psz_port,"%i",i_port);
char psz_port[6];
snprintf(psz_port, sizeof (psz_port), "%i",i_port);
port +=psz_port;
}
void Program::SetTTL(char *p){program_ttl=p;}
void Program::SetTTL(const char *p){program_ttl=p;}
Program::Program(string n, string u, string m, string s, string a,string p)
: b_has_pl_group (false)
......
......@@ -40,14 +40,14 @@ class Program
string GetPlGroup();
/* Functions to set the values */
void SetName(char*);
void SetUser(char*);
void SetMachine(char*);
void SetSite(char*);
void SetAddress(char*);
void SetPort(char *);
void SetTTL(char *);
void SetPlGroup(char *);
void SetName(const char*);
void SetUser(const char*);
void SetMachine(const char*);
void SetSite(const char*);
void SetAddress(const char*);
void SetPort(const char *);
void SetTTL(const char *);
void SetPlGroup(const char *);
void SetHasPlGroup(bool);
void SetRTP(bool);
......
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