Optimise add_last_type() and change it to accept const char * pointers

The optimisation reduces the number of malloc_strcpy() calls, from 50 to 5
for most last types.
This commit is contained in:
Kevin Easton
2015-09-03 01:04:12 +10:00
parent c881dd7a9a
commit d62914af15
2 changed files with 23 additions and 15 deletions

View File

@@ -113,7 +113,7 @@ char *get_signoffreason(const char *nick);
#ifdef GUI
char *convert_output_format2 (const char *);
#endif
void add_last_type (LastMsg *, int, char *, char *, char *, char *);
void add_last_type(LastMsg *array, int size, const char *from, const char *uh, const char *to, const char *msg);
int check_last_type (LastMsg *, int, char *, char *);
int matchmcommand (char *, int);
char *convert_time (time_t);