From 6f3bd3a74c8a9e983f3a5748ecaaa729ebeb1c3e Mon Sep 17 00:00:00 2001 From: ultramage Date: Mon, 21 May 2007 18:40:29 +0000 Subject: - Removed the TURBO socket mechanism - it was in fact just using a variable to cache a few arithmetic operations (premature optimization) - Since the fifohead mess is gone, fixed leftover bad code structuring git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10599 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/socket.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/common/socket.h') diff --git a/src/common/socket.h b/src/common/socket.h index a7734963a..f1997defe 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -21,19 +21,10 @@ // socket I/O macros -#ifdef TURBO -#define RFIFOVAR(fd) rbPtr ## fd -#define WFIFOVAR(fd) wbPtr ## fd -#define RFIFOHEAD(fd) uint8 *RFIFOVAR(fd) = session[fd]->rdata+session[fd]->rdata_pos -#define WFIFOHEAD(fd, x) uint8 *WFIFOVAR(fd) = ( (fd) > 0 && session[fd] ? session[fd]->wdata+session[fd]->wdata_size : NULL ) -#define RFIFOP(fd,pos) ( &RFIFOVAR(fd) + (pos) ) -#define WFIFOP(fd,pos) ( &WFIFOVAR(fd) + (pos) ) -#else #define RFIFOHEAD(fd) #define WFIFOHEAD(fd, size) do{ if((fd) && session[fd]->wdata_size + (size) > session[fd]->max_wdata ) realloc_writefifo(fd, size); }while(0) #define RFIFOP(fd,pos) (session[fd]->rdata + session[fd]->rdata_pos + (pos)) #define WFIFOP(fd,pos) (session[fd]->wdata + session[fd]->wdata_size + (pos)) -#endif #define RFIFOB(fd,pos) (*(uint8*)RFIFOP(fd,pos)) #define WFIFOB(fd,pos) (*(uint8*)WFIFOP(fd,pos)) -- cgit v1.2.3-70-g09d2