summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-03-03 16:15:43 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2024-03-03 16:15:43 +0100
commitd832ab742a9247b928c530a91d195410b17387b4 (patch)
treeec438d216717bc1f5b37ac378948719ee4ef6ebf /src
parent2e315e5424d2e54da14ca8f27a4392a3d6be8083 (diff)
Fix Visual Studio compiler warnings
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Terminal.cxx4
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx2
2 files changed, 3 insertions, 3 deletions
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.);
}