فهرست منبع

No need to call irc_log as it does nothing.

Not sure if this is optimized out but the parameters
have function calls which are relatively expensive.
No need to call them all anyhow.
Bryan Drewery 7 سال پیش
والد
کامیت
72c4102650
3فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 1 0
      doc/UPDATES.md
  2. 2 0
      src/log.cc
  3. 4 0
      src/log.h

+ 1 - 0
doc/UPDATES.md

@@ -2,6 +2,7 @@
   * Clear FiSH keys when a client quits.
   * Fix crash when clearing last botset entry for a bot.
   * Bots now share channel key to other bots even if not opped.
+  * Some small performance improvements
 
 # 1.4.9
   * Fix various compile warnings and spam

+ 2 - 0
src/log.cc

@@ -335,6 +335,7 @@ void putlog(int type, const char *chname, const char *format, ...)
   }
 }
 
+#if 0
 void
 irc_log(struct chanset_t *chan, const char *format, ...)
 {
@@ -362,4 +363,5 @@ irc_log(struct chanset_t *chan, const char *format, ...)
 */
 #endif 
 }
+#endif
 /* vim: set sts=2 sw=2 ts=8 et: */

+ 4 - 0
src/log.h

@@ -33,7 +33,11 @@ void putlog (int, const char *, const char *, ...) __attribute__((format(printf,
 int logmodes(const char *);
 char *masktype(int);
 char *maskname(int);
+#if 0
 void irc_log(struct chanset_t *, const char *, ...) __attribute__((format(printf, 2, 3)));
+#else
+#define irc_log(...)
+#endif
 void logfile(int type, const char *msg);
 
 extern int		conmask;