Don't use *_t for our own typedefs
It's reserved by POSIX. (closes #158 pull request)
This commit is contained in:
committed by
Keith Winstein
parent
937882caff
commit
cd2d482484
@@ -299,7 +299,7 @@ void TitleEngine::set_prefix( const wstring s )
|
||||
|
||||
void ConditionalOverlayRow::apply( Framebuffer &fb, uint64_t confirmed_epoch, bool flag ) const
|
||||
{
|
||||
for ( overlay_cells_t::const_iterator it = overlay_cells.begin();
|
||||
for ( overlay_cells_type::const_iterator it = overlay_cells.begin();
|
||||
it != overlay_cells.end();
|
||||
it++ ) {
|
||||
it->apply( fb, confirmed_epoch, row_num, flag );
|
||||
@@ -313,13 +313,13 @@ void PredictionEngine::apply( Framebuffer &fb ) const
|
||||
|| (display_preference == Always) );
|
||||
|
||||
if ( show ) {
|
||||
for ( cursors_t::const_iterator it = cursors.begin();
|
||||
for ( cursors_type::const_iterator it = cursors.begin();
|
||||
it != cursors.end();
|
||||
it++ ) {
|
||||
it->apply( fb, confirmed_epoch );
|
||||
}
|
||||
|
||||
for ( overlays_t::const_iterator it = overlays.begin();
|
||||
for ( overlays_type::const_iterator it = overlays.begin();
|
||||
it != overlays.end();
|
||||
it++ ) {
|
||||
it->apply( fb, confirmed_epoch, flagging );
|
||||
@@ -337,10 +337,10 @@ void PredictionEngine::kill_epoch( uint64_t epoch, const Framebuffer &fb )
|
||||
prediction_epoch ) );
|
||||
cursor().active = true;
|
||||
|
||||
for ( overlays_t::iterator i = overlays.begin();
|
||||
for ( overlays_type::iterator i = overlays.begin();
|
||||
i != overlays.end();
|
||||
i++ ) {
|
||||
for ( overlay_cells_t::iterator j = i->overlay_cells.begin();
|
||||
for ( overlay_cells_type::iterator j = i->overlay_cells.begin();
|
||||
j != i->overlay_cells.end();
|
||||
j++ ) {
|
||||
if ( j->tentative( epoch - 1 ) ) {
|
||||
@@ -413,9 +413,9 @@ void PredictionEngine::cull( const Framebuffer &fb )
|
||||
|
||||
/* go through cell predictions */
|
||||
|
||||
overlays_t::iterator i = overlays.begin();
|
||||
overlays_type::iterator i = overlays.begin();
|
||||
while ( i != overlays.end() ) {
|
||||
overlays_t::iterator inext = i;
|
||||
overlays_type::iterator inext = i;
|
||||
inext++;
|
||||
if ( (i->row_num < 0) || (i->row_num >= fb.ds.get_height()) ) {
|
||||
overlays.erase( i );
|
||||
@@ -423,7 +423,7 @@ void PredictionEngine::cull( const Framebuffer &fb )
|
||||
continue;
|
||||
}
|
||||
|
||||
for ( overlay_cells_t::iterator j = i->overlay_cells.begin();
|
||||
for ( overlay_cells_type::iterator j = i->overlay_cells.begin();
|
||||
j != i->overlay_cells.end();
|
||||
j++ ) {
|
||||
switch ( j->get_validity( fb, i->row_num,
|
||||
@@ -532,7 +532,7 @@ void PredictionEngine::cull( const Framebuffer &fb )
|
||||
}
|
||||
|
||||
/* NB: switching from list to another STL container could break this code.
|
||||
So we don't use the cursors_t typedef. */
|
||||
So we don't use the cursors_type typedef. */
|
||||
for ( list<ConditionalCursorMove>::iterator it = cursors.begin();
|
||||
it != cursors.end(); ) {
|
||||
if ( it->get_validity( fb, local_frame_acked, local_frame_late_acked ) != Pending ) {
|
||||
@@ -545,7 +545,7 @@ void PredictionEngine::cull( const Framebuffer &fb )
|
||||
|
||||
ConditionalOverlayRow & PredictionEngine::get_or_make_row( int row_num, int num_cols )
|
||||
{
|
||||
overlays_t::iterator it =
|
||||
overlays_type::iterator it =
|
||||
find_if( overlays.begin(), overlays.end(),
|
||||
bind2nd( mem_fun_ref( &ConditionalOverlayRow::row_num_eq ), row_num ) );
|
||||
|
||||
@@ -755,11 +755,11 @@ void PredictionEngine::newline_carriage_return( const Framebuffer &fb )
|
||||
init_cursor( fb );
|
||||
cursor().col = 0;
|
||||
if ( cursor().row == fb.ds.get_height() - 1 ) {
|
||||
for ( overlays_t::iterator i = overlays.begin();
|
||||
for ( overlays_type::iterator i = overlays.begin();
|
||||
i != overlays.end();
|
||||
i++ ) {
|
||||
i->row_num--;
|
||||
for ( overlay_cells_t::iterator j = i->overlay_cells.begin();
|
||||
for ( overlay_cells_type::iterator j = i->overlay_cells.begin();
|
||||
j != i->overlay_cells.end();
|
||||
j++ ) {
|
||||
if ( j->active ) {
|
||||
@@ -770,7 +770,7 @@ void PredictionEngine::newline_carriage_return( const Framebuffer &fb )
|
||||
|
||||
/* make blank prediction for last row */
|
||||
ConditionalOverlayRow &the_row = get_or_make_row( cursor().row, fb.ds.get_width() );
|
||||
for ( overlay_cells_t::iterator j = the_row.overlay_cells.begin();
|
||||
for ( overlay_cells_type::iterator j = the_row.overlay_cells.begin();
|
||||
j != the_row.overlay_cells.end();
|
||||
j++ ) {
|
||||
j->active = true;
|
||||
@@ -799,10 +799,10 @@ bool PredictionEngine::active( void ) const
|
||||
return true;
|
||||
}
|
||||
|
||||
for ( overlays_t::const_iterator i = overlays.begin();
|
||||
for ( overlays_type::const_iterator i = overlays.begin();
|
||||
i != overlays.end();
|
||||
i++ ) {
|
||||
for ( overlay_cells_t::const_iterator j = i->overlay_cells.begin();
|
||||
for ( overlay_cells_type::const_iterator j = i->overlay_cells.begin();
|
||||
j != i->overlay_cells.end();
|
||||
j++ ) {
|
||||
if ( j->active ) {
|
||||
|
||||
@@ -112,8 +112,8 @@ namespace Overlay {
|
||||
public:
|
||||
int row_num;
|
||||
|
||||
typedef vector<ConditionalOverlayCell> overlay_cells_t;
|
||||
overlay_cells_t overlay_cells;
|
||||
typedef vector<ConditionalOverlayCell> overlay_cells_type;
|
||||
overlay_cells_type overlay_cells;
|
||||
|
||||
void apply( Framebuffer &fb, uint64_t confirmed_epoch, bool flag ) const;
|
||||
|
||||
@@ -159,13 +159,13 @@ namespace Overlay {
|
||||
char last_byte;
|
||||
Parser::UTF8Parser parser;
|
||||
|
||||
typedef list<ConditionalOverlayRow> overlays_t;
|
||||
overlays_t overlays;
|
||||
typedef list<ConditionalOverlayRow> overlays_type;
|
||||
overlays_type overlays;
|
||||
|
||||
typedef list<ConditionalCursorMove> cursors_t;
|
||||
cursors_t cursors;
|
||||
typedef list<ConditionalCursorMove> cursors_type;
|
||||
cursors_type cursors;
|
||||
|
||||
typedef ConditionalOverlayRow::overlay_cells_t overlay_cells_t;
|
||||
typedef ConditionalOverlayRow::overlay_cells_type overlay_cells_type;
|
||||
|
||||
uint64_t local_frame_sent, local_frame_acked, local_frame_late_acked;
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ void TransportSender<MyState>::add_sent_state( uint64_t the_timestamp, uint64_t
|
||||
{
|
||||
sent_states.push_back( TimestampedState<MyState>( the_timestamp, num, state ) );
|
||||
if ( sent_states.size() > 32 ) { /* limit on state queue */
|
||||
typename sent_states_t::iterator last = sent_states.end();
|
||||
typename sent_states_type::iterator last = sent_states.end();
|
||||
for ( int i = 0; i < 16; i++ ) { last--; }
|
||||
sent_states.erase( last ); /* erase state from middle of queue */
|
||||
}
|
||||
|
||||
@@ -59,13 +59,13 @@ namespace Network {
|
||||
|
||||
MyState current_state;
|
||||
|
||||
typedef list< TimestampedState<MyState> > sent_states_t;
|
||||
sent_states_t sent_states;
|
||||
typedef list< TimestampedState<MyState> > sent_states_type;
|
||||
sent_states_type sent_states;
|
||||
/* first element: known, acknowledged receiver state */
|
||||
/* last element: last sent state */
|
||||
|
||||
/* somewhere in the middle: the assumed state of the receiver */
|
||||
typename sent_states_t::iterator assumed_receiver_state;
|
||||
typename sent_states_type::iterator assumed_receiver_state;
|
||||
|
||||
/* for fragment creation */
|
||||
Fragmenter fragmenter;
|
||||
|
||||
@@ -113,7 +113,7 @@ bool Complete::set_echo_ack( uint64_t now )
|
||||
bool ret = false;
|
||||
uint64_t newest_echo_ack = 0;
|
||||
|
||||
for ( input_history_t::const_iterator i = input_history.begin();
|
||||
for ( input_history_type::const_iterator i = input_history.begin();
|
||||
i != input_history.end();
|
||||
i++ ) {
|
||||
if ( i->second < now - ECHO_TIMEOUT ) {
|
||||
@@ -143,7 +143,7 @@ int Complete::wait_time( uint64_t now ) const
|
||||
return INT_MAX;
|
||||
}
|
||||
|
||||
input_history_t::const_iterator it = input_history.begin();
|
||||
input_history_type::const_iterator it = input_history.begin();
|
||||
it++;
|
||||
|
||||
uint64_t next_echo_ack_time = it->second + ECHO_TIMEOUT;
|
||||
|
||||
@@ -34,8 +34,8 @@ namespace Terminal {
|
||||
Terminal::Emulator terminal;
|
||||
Terminal::Display display;
|
||||
|
||||
typedef std::list< std::pair<uint64_t, uint64_t> > input_history_t;
|
||||
input_history_t input_history;
|
||||
typedef std::list< std::pair<uint64_t, uint64_t> > input_history_type;
|
||||
input_history_type input_history;
|
||||
uint64_t echo_ack;
|
||||
|
||||
static const int ECHO_TIMEOUT = 50; /* for late ack */
|
||||
|
||||
@@ -322,10 +322,10 @@ void Framebuffer::soft_reset( void )
|
||||
|
||||
void Framebuffer::posterize( void )
|
||||
{
|
||||
for ( rows_t::iterator i = rows.begin();
|
||||
for ( rows_type::iterator i = rows.begin();
|
||||
i != rows.end();
|
||||
i++ ) {
|
||||
for ( Row::cells_t::iterator j = i->cells.begin();
|
||||
for ( Row::cells_type::iterator j = i->cells.begin();
|
||||
j != i->cells.end();
|
||||
j++ ) {
|
||||
j->renditions.posterize();
|
||||
@@ -340,7 +340,7 @@ void Framebuffer::resize( int s_width, int s_height )
|
||||
|
||||
rows.resize( s_height, newrow() );
|
||||
|
||||
for ( rows_t::iterator i = rows.begin();
|
||||
for ( rows_type::iterator i = rows.begin();
|
||||
i != rows.end();
|
||||
i++ ) {
|
||||
i->set_wrap( false );
|
||||
@@ -540,7 +540,7 @@ void Renditions::posterize( void )
|
||||
|
||||
void Row::reset( int background_color )
|
||||
{
|
||||
for ( cells_t::iterator i = cells.begin();
|
||||
for ( cells_type::iterator i = cells.begin();
|
||||
i != cells.end();
|
||||
i++ ) {
|
||||
i->reset( background_color );
|
||||
|
||||
@@ -106,8 +106,8 @@ namespace Terminal {
|
||||
|
||||
class Row {
|
||||
public:
|
||||
typedef std::vector<Cell> cells_t;
|
||||
cells_t cells;
|
||||
typedef std::vector<Cell> cells_type;
|
||||
cells_type cells;
|
||||
|
||||
Row( size_t s_width, int background_color )
|
||||
: cells( s_width, Cell( background_color ) )
|
||||
@@ -224,8 +224,8 @@ namespace Terminal {
|
||||
|
||||
class Framebuffer {
|
||||
private:
|
||||
typedef std::deque<Row> rows_t;
|
||||
rows_t rows;
|
||||
typedef std::deque<Row> rows_type;
|
||||
rows_type rows;
|
||||
std::deque<wchar_t> icon_name;
|
||||
std::deque<wchar_t> window_title;
|
||||
unsigned int bell_count;
|
||||
|
||||
Reference in New Issue
Block a user