summaryrefslogtreecommitdiff
path: root/src/Fl_Tree.cxx
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2012-04-05 05:12:30 +0000
committerFabien Costantini <fabien@onepost.net>2012-04-05 05:12:30 +0000
commit8809c5d65dd20895dcae90e9d2af05fd271f2e9e (patch)
treed53cbf6d921ae68bda31b6c5d522dc8c87ee9bd1 /src/Fl_Tree.cxx
parent37ea8ba9e635e9655417714bd49ab7bb2b36beb5 (diff)
Fixed build error in msvs because Fl ref to FULLSCREEN enum was not accessible in Fl_Widget. new inline is_fullscreen() getter has been implemented to avoid a build error with (at least) msvc compilers. Fixed a ton of warnings / problems when bilding on windows 64 bits target with ms toolchain. cleaned up about 200 warnings raised when building win74 targets.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tree.cxx')
-rw-r--r--src/Fl_Tree.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Fl_Tree.cxx b/src/Fl_Tree.cxx
index ecf1fff27..887723150 100644
--- a/src/Fl_Tree.cxx
+++ b/src/Fl_Tree.cxx
@@ -572,7 +572,7 @@ int Fl_Tree::item_pathname(char *pathname, int pathnamelen, const Fl_Tree_Item *
if ( item->is_root() && showroot() == 0 ) break; // don't include root in path if showroot() off
// Find name of current item
const char *name = item->label() ? item->label() : "???"; // name for this item
- int len = strlen(name);
+ int len = (int) strlen(name);
// Add name to end of pathname[]
for ( --len; len>=0; len-- ) {
SAFE_RCAT(name[len]); // rcat name of item
@@ -1719,7 +1719,7 @@ Fl_Tree_Reason Fl_Tree::callback_reason() const {
*/
void Fl_Tree::load(Fl_Preferences &prefs)
{
- int i, j, n, pn = strlen(prefs.path());
+ int i, j, n, pn = (int) strlen(prefs.path());
char *p;
const char *path = prefs.path();
if (strcmp(path, ".")==0)
@@ -1736,21 +1736,21 @@ void Fl_Tree::load(Fl_Preferences &prefs)
for (i=0; i<n; i++) {
// We must remove all fwd slashes in the key and value strings. Replace with backslash.
char *key = strdup(prefs.entry(i));
- int kn = strlen(key);
+ int kn = (int) strlen(key);
for (j=0; j<kn; j++) {
if (key[j]=='/') key[j]='\\';
}
char *val; prefs.get(key, val, "");
- int vn = strlen(val);
+ int vn = (int) strlen(val);
for (j=0; j<vn; j++) {
if (val[j]=='/') val[j]='\\';
}
if (vn<40) {
- int sze = pn + strlen(key) + vn;
+ size_t sze = pn + strlen(key) + vn;
p = (char*)malloc(sze+5);
sprintf(p, "%s/%s = %s", path, key, val);
} else {
- int sze = pn + strlen(key) + 40;
+ size_t sze = pn + strlen(key) + 40;
p = (char*)malloc(sze+5);
sprintf(p, "%s/%s = %.40s...", path, key, val);
}