Some code changes for GCC 7

This commit is contained in:
Markus Gans 2017-08-11 10:50:39 +02:00
parent 55070bfc39
commit 48e737818c
6 changed files with 24 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2017-08-11 Markus Gans <guru.mail@muenster.de>
* Some code changes for GCC 7
* Implementation of a copy constructor for FPoint and FRect
2017-08-06 Markus Gans <guru.mail@muenster.de> 2017-08-06 Markus Gans <guru.mail@muenster.de>
* Fix GNU Screen support for vte/gnome-terminals * Fix GNU Screen support for vte/gnome-terminals
* Advanced streaming functionality for FTermBuffer * Advanced streaming functionality for FTermBuffer

View File

@ -702,7 +702,7 @@ int FFileDialog::changeDir (const FString& dirname)
printPath(directory); printPath(directory);
filename->redraw(); filename->redraw();
filebrowser->redraw(); filebrowser->redraw();
// fall through
default: default:
return 0; return 0;
} }

View File

@ -23,6 +23,7 @@ class FPoint
public: public:
// Constructors // Constructors
FPoint (); FPoint ();
FPoint (const FPoint&); // copy constructor
FPoint (int, int); FPoint (int, int);
// Destructor // Destructor
@ -69,6 +70,12 @@ inline FPoint::FPoint()
, ypos(0) , ypos(0)
{ } { }
//----------------------------------------------------------------------
inline FPoint::FPoint (const FPoint& p) // copy constructor
: xpos(p.xpos)
, ypos(p.ypos)
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline FPoint::FPoint (int x, int y) inline FPoint::FPoint (int x, int y)
: xpos(short(x)) : xpos(short(x))

View File

@ -27,6 +27,7 @@ class FRect
public: public:
// Constructors // Constructors
FRect (); FRect ();
FRect (const FRect&); // copy constructor
FRect (int, int, int, int); FRect (int, int, int, int);
FRect (const FPoint&, const FPoint&); FRect (const FPoint&, const FPoint&);
@ -112,6 +113,14 @@ inline FRect::FRect()
, Y2(-1) , Y2(-1)
{ } { }
//----------------------------------------------------------------------
inline FRect::FRect (const FRect& r) // copy constructor
: X1(r.X1)
, Y1(r.Y1)
, X2(r.X2)
, Y2(r.Y2)
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline FRect::FRect (int x, int y, int width, int height) inline FRect::FRect (int x, int y, int width, int height)
: X1(short(x)) : X1(short(x))

View File

@ -441,7 +441,7 @@ int FVTerm::print (term_area* area, const FString& s)
{ {
case '\n': case '\n':
area->cursor_y++; area->cursor_y++;
// fall through
case '\r': case '\r':
area->cursor_x = 1; area->cursor_x = 1;
break; break;
@ -599,7 +599,7 @@ int FVTerm::print (term_area* area, const std::vector<char_data>& termString)
{ {
case '\n': case '\n':
area->cursor_y++; area->cursor_y++;
// fall through
case '\r': case '\r':
area->cursor_x = 1; area->cursor_x = 1;
break; break;

View File

@ -67,7 +67,7 @@ void move (int xold, int yold, int xnew, int ynew)
// prints the cursor move escape sequence // prints the cursor move escape sequence
std::string sequence; std::string sequence;
char* buffer; char* buffer;
char from[10], to[10], byte[15]; char from[10], to[10], byte[20];
uInt len; uInt len;
term_boundaries(xold, yold); term_boundaries(xold, yold);