Modernize all typedefs with using statements
This commit is contained in:
committed by
Alex Chernyakhovsky
parent
38c84a9330
commit
8469db91db
@@ -95,7 +95,7 @@
|
|||||||
|
|
||||||
#include "src/network/networktransport-impl.h"
|
#include "src/network/networktransport-impl.h"
|
||||||
|
|
||||||
typedef Network::Transport< Terminal::Complete, Network::UserStream > ServerConnection;
|
using ServerConnection = Network::Transport<Terminal::Complete, Network::UserStream>;
|
||||||
|
|
||||||
static void serve( int host_fd,
|
static void serve( int host_fd,
|
||||||
Terminal::Complete &terminal,
|
Terminal::Complete &terminal,
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ private:
|
|||||||
|
|
||||||
Terminal::Framebuffer local_framebuffer, new_state;
|
Terminal::Framebuffer local_framebuffer, new_state;
|
||||||
Overlay::OverlayManager overlays;
|
Overlay::OverlayManager overlays;
|
||||||
typedef Network::Transport< Network::UserStream, Terminal::Complete > NetworkType;
|
using NetworkType = Network::Transport<Network::UserStream, Terminal::Complete>;
|
||||||
using NetworkPointer = std::shared_ptr<NetworkType>;
|
using NetworkPointer = std::shared_ptr<NetworkType>;
|
||||||
NetworkPointer network;
|
NetworkPointer network;
|
||||||
Terminal::Display display;
|
Terminal::Display display;
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ namespace Overlay {
|
|||||||
using namespace Terminal;
|
using namespace Terminal;
|
||||||
using namespace Network;
|
using namespace Network;
|
||||||
using std::deque;
|
using std::deque;
|
||||||
using std::list;
|
|
||||||
using std::vector;
|
|
||||||
using std::wstring;
|
using std::wstring;
|
||||||
|
|
||||||
enum Validity {
|
enum Validity {
|
||||||
@@ -99,8 +97,8 @@ namespace Overlay {
|
|||||||
Cell replacement;
|
Cell replacement;
|
||||||
bool unknown;
|
bool unknown;
|
||||||
|
|
||||||
vector<Cell> original_contents; /* we don't give credit for correct predictions
|
std::vector<Cell> original_contents; /* we don't give credit for correct predictions
|
||||||
that match the original contents */
|
that match the original contents */
|
||||||
|
|
||||||
void apply( Framebuffer &fb, uint64_t confirmed_epoch, int row, bool flag ) const;
|
void apply( Framebuffer &fb, uint64_t confirmed_epoch, int row, bool flag ) const;
|
||||||
Validity get_validity( const Framebuffer &fb, int row, uint64_t early_ack, uint64_t late_ack ) const;
|
Validity get_validity( const Framebuffer &fb, int row, uint64_t early_ack, uint64_t late_ack ) const;
|
||||||
@@ -128,7 +126,7 @@ namespace Overlay {
|
|||||||
public:
|
public:
|
||||||
int row_num;
|
int row_num;
|
||||||
|
|
||||||
typedef vector<ConditionalOverlayCell> overlay_cells_type;
|
using overlay_cells_type = std::vector<ConditionalOverlayCell>;
|
||||||
overlay_cells_type overlay_cells;
|
overlay_cells_type overlay_cells;
|
||||||
|
|
||||||
void apply( Framebuffer &fb, uint64_t confirmed_epoch, bool flag ) const;
|
void apply( Framebuffer &fb, uint64_t confirmed_epoch, bool flag ) const;
|
||||||
@@ -215,13 +213,13 @@ namespace Overlay {
|
|||||||
char last_byte;
|
char last_byte;
|
||||||
Parser::UTF8Parser parser;
|
Parser::UTF8Parser parser;
|
||||||
|
|
||||||
typedef list<ConditionalOverlayRow> overlays_type;
|
using overlays_type = std::list<ConditionalOverlayRow>;
|
||||||
overlays_type overlays;
|
overlays_type overlays;
|
||||||
|
|
||||||
typedef list<ConditionalCursorMove> cursors_type;
|
using cursors_type = std::list<ConditionalCursorMove>;
|
||||||
cursors_type cursors;
|
cursors_type cursors;
|
||||||
|
|
||||||
typedef ConditionalOverlayRow::overlay_cells_type overlay_cells_type;
|
using overlay_cells_type = ConditionalOverlayRow::overlay_cells_type;
|
||||||
|
|
||||||
uint64_t local_frame_sent, local_frame_acked, local_frame_late_acked;
|
uint64_t local_frame_sent, local_frame_acked, local_frame_late_acked;
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace Network {
|
|||||||
|
|
||||||
MyState current_state;
|
MyState current_state;
|
||||||
|
|
||||||
typedef list< TimestampedState<MyState> > sent_states_type;
|
using sent_states_type = std::list<TimestampedState<MyState>>;
|
||||||
sent_states_type sent_states;
|
sent_states_type sent_states;
|
||||||
/* first element: known, acknowledged receiver state */
|
/* first element: known, acknowledged receiver state */
|
||||||
/* last element: last sent state */
|
/* last element: last sent state */
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace Terminal {
|
|||||||
// outside calls to act() to keep horrible things from happening.
|
// outside calls to act() to keep horrible things from happening.
|
||||||
Parser::Actions actions;
|
Parser::Actions actions;
|
||||||
|
|
||||||
typedef std::list< std::pair<uint64_t, uint64_t> > input_history_type;
|
using input_history_type = std::list<std::pair<uint64_t, uint64_t>>;
|
||||||
input_history_type input_history;
|
input_history_type input_history;
|
||||||
uint64_t echo_ack;
|
uint64_t echo_ack;
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace Parser {
|
|||||||
};
|
};
|
||||||
|
|
||||||
using ActionPointer = std::shared_ptr<Action>;
|
using ActionPointer = std::shared_ptr<Action>;
|
||||||
typedef std::vector<ActionPointer> Actions;
|
using Actions = std::vector<ActionPointer>;
|
||||||
|
|
||||||
class Ignore : public Action {
|
class Ignore : public Action {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace Terminal {
|
|||||||
bool clears_wrap_state;
|
bool clears_wrap_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<std::string, Function> dispatch_map_t;
|
using dispatch_map_t = std::map<std::string, Function>;
|
||||||
|
|
||||||
class DispatchRegistry {
|
class DispatchRegistry {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ std::string Display::new_frame( bool initialized, const Framebuffer &last, const
|
|||||||
if ( f.get_bell_count() != frame.last_frame.get_bell_count() ) {
|
if ( f.get_bell_count() != frame.last_frame.get_bell_count() ) {
|
||||||
frame.append( '\007' );
|
frame.append( '\007' );
|
||||||
}
|
}
|
||||||
typedef Terminal::Framebuffer::title_type title_type;
|
using title_type = Terminal::Framebuffer::title_type;
|
||||||
|
|
||||||
/* has icon name or window title changed? */
|
/* has icon name or window title changed? */
|
||||||
if ( has_title && f.is_title_initialized() &&
|
if ( has_title && f.is_title_initialized() &&
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
/* Terminal framebuffer */
|
/* Terminal framebuffer */
|
||||||
|
|
||||||
namespace Terminal {
|
namespace Terminal {
|
||||||
typedef uint32_t color_type;
|
using color_type = uint32_t;
|
||||||
|
|
||||||
class Renditions {
|
class Renditions {
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user