diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-03-07 01:15:57 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2025-03-07 01:15:57 +0100 |
| commit | 6acda521ccaa448eeb26f81a2432da586bed9b30 (patch) | |
| tree | c5cdcca4e341539a0165a74b59a916922ccccb40 /fluid | |
| parent | 063ff67fcdd6976be214b6fb519d45c650d5498c (diff) | |
Removes the remaining references to Fl_String.
Still to do: rename fl_filename... to fl_filename..._str
and introduce into core library.
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fd_Snap_Action.h | 2 | ||||
| -rw-r--r-- | fluid/autodoc.h | 4 | ||||
| -rw-r--r-- | fluid/code.cxx | 2 | ||||
| -rw-r--r-- | fluid/code.h | 2 | ||||
| -rw-r--r-- | fluid/fluid.h | 3 | ||||
| -rw-r--r-- | fluid/fluid_filename.cxx | 7 | ||||
| -rw-r--r-- | fluid/fluid_filename.h | 2 | ||||
| -rw-r--r-- | fluid/mergeback.h | 3 | ||||
| -rw-r--r-- | fluid/shell_command.cxx | 2 | ||||
| -rw-r--r-- | fluid/shell_command.h | 2 |
10 files changed, 14 insertions, 15 deletions
diff --git a/fluid/Fd_Snap_Action.h b/fluid/Fd_Snap_Action.h index bfb32624c..a7485c770 100644 --- a/fluid/Fd_Snap_Action.h +++ b/fluid/Fd_Snap_Action.h @@ -20,7 +20,7 @@ #include "fluid.h" #include "Fl_Window_Type.h" -#include "../src/Fl_String.H" +#include <string> struct Fl_Menu_Item; diff --git a/fluid/autodoc.h b/fluid/autodoc.h index 1d6ec621b..51f9739ea 100644 --- a/fluid/autodoc.h +++ b/fluid/autodoc.h @@ -22,12 +22,12 @@ #ifndef fl_screenshot_H #define fl_screenshot_H -#include "../src/Fl_String.H" - #include <FL/Fl_Export.H> #include <FL/Fl_Window.H> #include <FL/Fl_Rect.H> +#include <string> + /** Class to initialize a Rect by providing the margin around a rect. */ class Fl_Margin : public Fl_Rect { public: diff --git a/fluid/code.cxx b/fluid/code.cxx index 0e715441a..3c789abd3 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -798,7 +798,7 @@ int Fd_Code_Writer::write_code(const char *s, const char *t, bool to_codeview) { // Remember the last code file location for MergeBack if (s && g_project.write_mergeback_data && !to_codeview) { std::string proj_filename = g_project.projectfile_path() + g_project.projectfile_name(); - int i, n = proj_filename.size(); + int i, n = (int)proj_filename.size(); for (i=0; i<n; i++) if (proj_filename[i]=='\\') proj_filename[i] = '/'; Fl_Preferences build_records(Fl_Preferences::USER_L, "fltk.org", "fluid-build"); Fl_Preferences path(build_records, proj_filename.c_str()); diff --git a/fluid/code.h b/fluid/code.h index 84d6a4218..758e7bf45 100644 --- a/fluid/code.h +++ b/fluid/code.h @@ -18,10 +18,10 @@ #define _FLUID_CODE_H #include <FL/fl_attr.h> -#include "../src/Fl_String.H" #include <stdarg.h> #include <stdio.h> +#include <string> class Fl_Type; struct Fd_Identifier_Tree; diff --git a/fluid/fluid.h b/fluid/fluid.h index e8730efb2..140231936 100644 --- a/fluid/fluid.h +++ b/fluid/fluid.h @@ -20,7 +20,8 @@ #include "fluid_filename.h" #include <FL/Fl_Preferences.H> #include <FL/Fl_Menu_Item.H> -#include "../src/Fl_String.H" + +#include <string> #define BROWSERWIDTH 300 #define BROWSERHEIGHT 500 diff --git a/fluid/fluid_filename.cxx b/fluid/fluid_filename.cxx index 45cb7469c..9bb3b1f73 100644 --- a/fluid/fluid_filename.cxx +++ b/fluid/fluid_filename.cxx @@ -30,12 +30,11 @@ */ #include <stdlib.h> +#include <string> #include <FL/filename.H> #include <FL/Fl.H> #include <FL/fl_string_functions.h> - -#include "../src/Fl_String.H" // NOTE: FLTK 1.4.x only ! #include "../src/flstring.h" @@ -187,7 +186,7 @@ std::string fl_filename_shortened(const std::string &filename, int max_chars) { static int home_chars = -1; if (home_chars==-1) { home = fl_filename_expand(tilde); - home_chars = fl_utf_nb_char((const uchar*)home.c_str(), home.size()); + home_chars = fl_utf_nb_char((const uchar*)home.c_str(), (int)home.size()); } std::string homed_filename; #if defined(_WIN32) || defined(__APPLE__) @@ -203,7 +202,7 @@ std::string fl_filename_shortened(const std::string &filename, int max_chars) { // C style pointer will stay valid until filename is modified. const unsigned char *u8str = reinterpret_cast<const unsigned char *>(homed_filename.c_str()); // Count the number of UTF-8 characters in the name. - int num_chars = fl_utf_nb_char(u8str, homed_filename.size()); + int num_chars = fl_utf_nb_char(u8str, (int)homed_filename.size()); if (num_chars+ell_bytes-1 > max_chars) { // Create a new string by replacing characters in the middle. int remove_chars = num_chars - max_chars + ell_bytes; diff --git a/fluid/fluid_filename.h b/fluid/fluid_filename.h index 7bcea51fb..5fa23c82e 100644 --- a/fluid/fluid_filename.h +++ b/fluid/fluid_filename.h @@ -39,7 +39,7 @@ # if defined(__cplusplus) -#include "../src/Fl_String.H" +#include <string> std::string fl_filename_shortened(const std::string &filename, int maxchars); std::string fl_filename_name(const std::string &filename); diff --git a/fluid/mergeback.h b/fluid/mergeback.h index 658e94928..f828e9669 100644 --- a/fluid/mergeback.h +++ b/fluid/mergeback.h @@ -22,9 +22,8 @@ #include <FL/fl_attr.h> -#include "../src/Fl_String.H" - #include <stdio.h> +#include <string> const int FD_TAG_GENERIC = 0; const int FD_TAG_CODE = 1; diff --git a/fluid/shell_command.cxx b/fluid/shell_command.cxx index a6c49c823..e961fc24c 100644 --- a/fluid/shell_command.cxx +++ b/fluid/shell_command.cxx @@ -364,7 +364,7 @@ void shell_pipe_cb(FL_SOCKET, void*) { static void expand_macro(std::string &cmd, const std::string ¯o, const std::string &content) { for (int i=0;;) { - i = cmd.find(macro, i); + i = (int)cmd.find(macro, i); if (i==(int)std::string::npos) break; cmd.replace(i, macro.size(), content); } diff --git a/fluid/shell_command.h b/fluid/shell_command.h index f167d3c33..e5f8e3e87 100644 --- a/fluid/shell_command.h +++ b/fluid/shell_command.h @@ -19,11 +19,11 @@ #include "fluid.h" -#include "../src/Fl_String.H" #include <FL/Enumerations.H> #include <stdio.h> #include <stdlib.h> +#include <string> #if defined(_WIN32) && !defined(__CYGWIN__) # include <direct.h> # include <windows.h> |
