Remove using-declarations for std:: types
This commit is contained in:
committed by
Alex Chernyakhovsky
parent
8469db91db
commit
19ad493dcb
@@ -43,12 +43,12 @@ using namespace ClientBuffers;
|
||||
|
||||
void UserStream::subtract( const UserStream *prefix )
|
||||
{
|
||||
// if we are subtracting ourself from ourself, just clear the deque
|
||||
// if we are subtracting ourself from ourself, just clear the std::deque
|
||||
if ( this == prefix ) {
|
||||
actions.clear();
|
||||
return;
|
||||
}
|
||||
for ( deque<UserEvent>::const_iterator i = prefix->actions.begin();
|
||||
for ( std::deque<UserEvent>::const_iterator i = prefix->actions.begin();
|
||||
i != prefix->actions.end();
|
||||
i++ ) {
|
||||
assert( this != prefix );
|
||||
@@ -58,11 +58,11 @@ void UserStream::subtract( const UserStream *prefix )
|
||||
}
|
||||
}
|
||||
|
||||
string UserStream::diff_from( const UserStream &existing ) const
|
||||
std::string UserStream::diff_from( const UserStream &existing ) const
|
||||
{
|
||||
deque<UserEvent>::const_iterator my_it = actions.begin();
|
||||
std::deque<UserEvent>::const_iterator my_it = actions.begin();
|
||||
|
||||
for ( deque<UserEvent>::const_iterator i = existing.actions.begin();
|
||||
for ( std::deque<UserEvent>::const_iterator i = existing.actions.begin();
|
||||
i != existing.actions.end();
|
||||
i++ ) {
|
||||
assert( my_it != actions.end() );
|
||||
@@ -80,7 +80,7 @@ string UserStream::diff_from( const UserStream &existing ) const
|
||||
/* can we combine this with a previous Keystroke? */
|
||||
if ( (output.instruction_size() > 0)
|
||||
&& (output.instruction( output.instruction_size() - 1 ).HasExtension( keystroke )) ) {
|
||||
output.mutable_instruction( output.instruction_size() - 1 )->MutableExtension( keystroke )->mutable_keys()->append( string( &the_byte, 1 ) );
|
||||
output.mutable_instruction( output.instruction_size() - 1 )->MutableExtension( keystroke )->mutable_keys()->append( std::string( &the_byte, 1 ) );
|
||||
} else {
|
||||
Instruction *new_inst = output.add_instruction();
|
||||
new_inst->MutableExtension( keystroke )->set_keys( &the_byte, 1 );
|
||||
@@ -105,14 +105,14 @@ string UserStream::diff_from( const UserStream &existing ) const
|
||||
return output.SerializeAsString();
|
||||
}
|
||||
|
||||
void UserStream::apply_string( const string &diff )
|
||||
void UserStream::apply_string( const std::string &diff )
|
||||
{
|
||||
ClientBuffers::UserMessage input;
|
||||
fatal_assert( input.ParseFromString( diff ) );
|
||||
|
||||
for ( int i = 0; i < input.instruction_size(); i++ ) {
|
||||
if ( input.instruction( i ).HasExtension( keystroke ) ) {
|
||||
string the_bytes = input.instruction( i ).GetExtension( keystroke ).keys();
|
||||
std::string the_bytes = input.instruction( i ).GetExtension( keystroke ).keys();
|
||||
for ( unsigned int loc = 0; loc < the_bytes.size(); loc++ ) {
|
||||
actions.push_back( UserEvent( UserByte( the_bytes.at( loc ) ) ) );
|
||||
}
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
#include "src/terminal/parseraction.h"
|
||||
|
||||
namespace Network {
|
||||
using std::deque;
|
||||
using std::list;
|
||||
using std::string;
|
||||
|
||||
enum UserEventType {
|
||||
UserByteType = 0,
|
||||
ResizeType = 1
|
||||
@@ -70,7 +66,7 @@ namespace Network {
|
||||
class UserStream
|
||||
{
|
||||
private:
|
||||
deque<UserEvent> actions;
|
||||
std::deque<UserEvent> actions;
|
||||
|
||||
public:
|
||||
UserStream() : actions() {}
|
||||
@@ -84,9 +80,9 @@ namespace Network {
|
||||
|
||||
/* interface for Network::Transport */
|
||||
void subtract( const UserStream *prefix );
|
||||
string diff_from( const UserStream &existing ) const;
|
||||
string init_diff( void ) const { return diff_from( UserStream() ); };
|
||||
void apply_string( const string &diff );
|
||||
std::string diff_from( const UserStream &existing ) const;
|
||||
std::string init_diff( void ) const { return diff_from( UserStream() ); };
|
||||
void apply_string( const std::string &diff );
|
||||
bool operator==( const UserStream &x ) const { return actions == x.actions; }
|
||||
|
||||
bool compare( const UserStream & ) { return false; }
|
||||
|
||||
Reference in New Issue
Block a user