From beeb9b4335d9ca6f947a52528453753a51f194f3 Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 12 Jul 2018 17:22:20 +0000 Subject: Style fixes in TCP code; remove MIN and PAIR from util.h. * Moved PAIR to toxav, where it's used (but really this should die). * Replace most MIN calls with typed `min_*` calls. Didn't replace the ones where the desired semantics are unclear. Moved the MIN macro to the one place where it's still used. * Avoid assignments in `while` loops. Instead, factored out the loop body into a separate `bool`-returning function. * Use named types for callbacks (`_cb` types). * Avoid assignments in `if` conditions. * Removed `MAKE_REALLOC` and expanded its two calls. We can't have templates in C, and this fake templating is ugly and hard to analyse and debug (it expands on a single line). * Moved epoll system include to the .c file, out of the .h file. * Avoid assignments in expressions (`a = b = c;`). * Avoid multiple declarators per struct member declaration. * Fix naming inconsistencies. * Replace `net_to_host` macro with function. --- toxav/video.h | 1 + 1 file changed, 1 insertion(+) (limited to 'toxav/video.h') diff --git a/toxav/video.h b/toxav/video.h index 616a866a..7a0913a0 100644 --- a/toxav/video.h +++ b/toxav/video.h @@ -24,6 +24,7 @@ #include "../toxcore/logger.h" #include "../toxcore/util.h" +#include "pair.h" #include #include -- cgit v1.2.3