From d832ab742a9247b928c530a91d195410b17387b4 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 3 Mar 2024 16:15:43 +0100 Subject: Fix Visual Studio compiler warnings --- src/Fl_Terminal.cxx | 4 ++-- src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Fl_Terminal.cxx b/src/Fl_Terminal.cxx index bd3f3505a..9dcb1b1f3 100644 --- a/src/Fl_Terminal.cxx +++ b/src/Fl_Terminal.cxx @@ -189,7 +189,7 @@ bool Fl_Terminal::Selection::start(int row, int col, bool char_right) { bool Fl_Terminal::Selection::extend(int row, int col, bool char_right) { // no selection started yet? start and return true int osrow = srow_, oerow = erow_, oscol = scol_, oecol = ecol_; - int oselection = is_selection_; + bool oselection = is_selection_; if (state_ == 0) return start(row, col, char_right); state_ = 2; // state: "extending selection" @@ -3812,7 +3812,7 @@ const char* Fl_Terminal::text(bool lines_below_cursor) const { if (trim) lines.resize(lines.size() - trim); lines += "\n"; } - return strdup(lines.c_str()); + return fl_strdup(lines.c_str()); } /** diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx index df6906bb4..41cab4604 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx @@ -486,5 +486,5 @@ int Fl_WinAPI_Screen_Driver::screen_num_unscaled(int x, int y) float Fl_WinAPI_Screen_Driver::base_scale(int numscreen) { - return dpi[numscreen][0] / 96.; + return float(dpi[numscreen][0] / 96.); } -- cgit v1.2.3