Remove BOOST_AUTO from completeterminal.cc

This commit is contained in:
Keegan McAllister
2012-03-14 02:08:10 -04:00
committed by Keith Winstein
parent 6e56fd2157
commit 5320fbd346
2 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -16,7 +16,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <boost/typeof/typeof.hpp>
#include <boost/lambda/lambda.hpp> #include <boost/lambda/lambda.hpp>
#include "completeterminal.h" #include "completeterminal.h"
@@ -112,7 +111,9 @@ bool Complete::set_echo_ack( uint64_t now )
bool ret = false; bool ret = false;
uint64_t newest_echo_ack = 0; uint64_t newest_echo_ack = 0;
for ( BOOST_AUTO( i, input_history.begin() ); i != input_history.end(); i++ ) { for ( input_history_t::const_iterator i = input_history.begin();
i != input_history.end();
i++ ) {
if ( i->second < now - ECHO_TIMEOUT ) { if ( i->second < now - ECHO_TIMEOUT ) {
newest_echo_ack = i->first; newest_echo_ack = i->first;
} }
@@ -140,7 +141,7 @@ int Complete::wait_time( uint64_t now ) const
return INT_MAX; return INT_MAX;
} }
BOOST_AUTO( it, input_history.begin() ); input_history_t::const_iterator it = input_history.begin();
it++; it++;
uint64_t next_echo_ack_time = it->second + ECHO_TIMEOUT; uint64_t next_echo_ack_time = it->second + ECHO_TIMEOUT;
+2 -1
View File
@@ -34,7 +34,8 @@ namespace Terminal {
Terminal::Emulator terminal; Terminal::Emulator terminal;
Terminal::Display display; Terminal::Display display;
std::list< std::pair<uint64_t, uint64_t> > input_history; typedef std::list< std::pair<uint64_t, uint64_t> > input_history_t;
input_history_t input_history;
uint64_t echo_ack; uint64_t echo_ack;
static const int ECHO_TIMEOUT = 50; /* for late ack */ static const int ECHO_TIMEOUT = 50; /* for late ack */