diff options
author | DRC <dcommander@users.sourceforge.net> | 2011-10-04 02:09:13 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2011-10-04 02:09:13 +0000 |
commit | e334a8aa00789c720aa70694fe2e134a65deda12 (patch) | |
tree | b54cf95eb8793c46a80f026ca819544b51988ba7 | |
parent | b898b888a3d83ed082c020f79283ecb42162a9d7 (diff) | |
download | tigervnc-e334a8aa00789c720aa70694fe2e134a65deda12.tar.gz tigervnc-e334a8aa00789c720aa70694fe2e134a65deda12.zip |
Re-commit MSVC build fixes, which were forcibly removed by 4675. Please (a) bring these upstream so they don't get deleted again, and (b) always check the build with MSVC prior to committing modifications to any libraries that affect that build.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4689 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | common/fltk/FL/Fl_Widget.H | 1 | ||||
-rw-r--r-- | common/fltk/src/fl_draw_pixmap.cxx | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/common/fltk/FL/Fl_Widget.H b/common/fltk/FL/Fl_Widget.H index 5cc6a796..041b2d36 100644 --- a/common/fltk/FL/Fl_Widget.H +++ b/common/fltk/FL/Fl_Widget.H @@ -108,6 +108,7 @@ struct FL_EXPORT Fl_Label { */ class FL_EXPORT Fl_Widget { friend class Fl_Group; + friend class Fl_X; Fl_Group* parent_; Fl_Callback* callback_; diff --git a/common/fltk/src/fl_draw_pixmap.cxx b/common/fltk/src/fl_draw_pixmap.cxx index 8296f671..b0244859 100644 --- a/common/fltk/src/fl_draw_pixmap.cxx +++ b/common/fltk/src/fl_draw_pixmap.cxx @@ -128,7 +128,7 @@ int fl_convert_pixmap(const char*const* cdata, uchar* out, Fl_Color bg) { if ((chars_per_pixel < 1) || (chars_per_pixel > 2)) return 0; - uchar colors[1<<(chars_per_pixel*8)][4]; + uchar (*colors)[4] = new uchar [1<<(chars_per_pixel*8)][4]; #ifdef WIN32 color_count = 0; @@ -229,6 +229,7 @@ int fl_convert_pixmap(const char*const* cdata, uchar* out, Fl_Color bg) { } } + delete [] colors; return 1; } @@ -242,10 +243,12 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) { if (!fl_measure_pixmap(cdata, w, h)) return 0; - uchar buffer[w*h*4]; + uchar *buffer = new uchar[w*h*4]; - if (!fl_convert_pixmap(cdata, buffer, bg)) + if (!fl_convert_pixmap(cdata, buffer, bg)) { + delete buffer; return 0; + } // FIXME: Hack until fl_draw_image() supports alpha properly #ifdef __APPLE_QUARTZ__ @@ -292,6 +295,7 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) { } #endif + delete buffer; return 1; } |