<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>[near-PATCH] speed optimisation and bugfix: do one memory allocation per packet instead of two</TITLE>

<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=866231116-09122004><FONT 
face="Lucida Console" color=#0000ff size=2>oops, I introduced a little bug in 
enet_packet_create: it's much better to do:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=866231116-09122004><FONT 
face="Lucida Console" color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=866231116-09122004><FONT 
face="Lucida Console" color=#0000ff size=2>if ( data )</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=866231116-09122004><FONT size=1><FONT 
face="Lucida Console">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memcpy <FONT 
color=#ff0000>(</FONT>packet_data<FONT color=#ff0000>(</FONT>packet<FONT 
color=#ff0000>),</FONT> data<FONT color=#ff0000>,</FONT> dataLength<FONT 
color=#ff0000>);</FONT></FONT></FONT> </SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=866231116-09122004><FONT 
face="Lucida Console" color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=866231116-09122004><FONT 
face="Lucida Console" color=#0000ff size=2>:-O</FONT></SPAN></DIV>
<DIV><FONT face="Lucida Console" color=#0000ff size=2></FONT>&nbsp;</DIV>
<P><FONT face="Lucida Console" color=#800000 
size=2>__________________________________</FONT> <BR><FONT face="Lucida Console" 
color=#800000 size=2>Benoit Germain</FONT> <BR><FONT face="Lucida Console" 
color=#800000 size=2>][ Engineer</FONT> <BR><FONT face="Lucida Console" 
color=#800000 size=2><A 
href="mailto:bgermain@ubisoft.fr">mailto:bgermain@ubisoft.fr</A></FONT> 
<BR><FONT face="Lucida Console" color=#800000 
size=2>__________________________________</FONT> </P>
<DIV><FONT face="Lucida Console" color=#0000ff 
size=2></FONT>&nbsp;</DIV></BODY></HTML>