diff options
author | miwi <miwi@FreeBSD.org> | 2013-06-04 18:03:18 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2013-06-04 18:03:18 +0800 |
commit | f9559bbd4675f50f0278632c377b52cec11a5abe (patch) | |
tree | 94d5b050a5b97c1c044268f1b1aa9f0443b79f23 /graphics/qslim | |
parent | e74a308a7fb6351380e49a73f45c625f824d97df (diff) | |
download | freebsd-ports-gnome-f9559bbd4675f50f0278632c377b52cec11a5abe.tar.gz freebsd-ports-gnome-f9559bbd4675f50f0278632c377b52cec11a5abe.tar.zst freebsd-ports-gnome-f9559bbd4675f50f0278632c377b52cec11a5abe.zip |
- Fix build with clang
PR: 179225
Submitted by: Ports Fury
Diffstat (limited to 'graphics/qslim')
-rw-r--r-- | graphics/qslim/files/patch-mixkit__src__MxDynBlock.h | 29 | ||||
-rw-r--r-- | graphics/qslim/files/patch-mixkit__src__MxStack.h | 31 | ||||
-rw-r--r-- | graphics/qslim/files/patch-tools-qslim_qvis.cxx | 9 | ||||
-rw-r--r-- | graphics/qslim/files/patch-tools__qslim__qslim.cxx | 11 |
4 files changed, 80 insertions, 0 deletions
diff --git a/graphics/qslim/files/patch-mixkit__src__MxDynBlock.h b/graphics/qslim/files/patch-mixkit__src__MxDynBlock.h new file mode 100644 index 000000000000..605e88e2befd --- /dev/null +++ b/graphics/qslim/files/patch-mixkit__src__MxDynBlock.h @@ -0,0 +1,29 @@ +--- mixkit/src/MxDynBlock.h.orig ++++ mixkit/src/MxDynBlock.h +@@ -35,13 +35,13 @@ + + void room_for(int len) + { +- if( length()<len ) resize(len); ++ if( length()<len ) this->resize(len); + fill = len; + } + + T& add() + { +- if( length()==total_space() ) resize(total_space() * 2); ++ if( length()==total_space() ) this->resize(total_space() * 2); + fill++; + return last(); + } +@@ -62,8 +62,8 @@ + // + int size() const { return length(); } + +- typename MxBlock<T>::iterator end() { return begin()+size(); } +- typename MxBlock<T>::const_iterator end() const { return begin()+size(); } ++ typename MxBlock<T>::iterator end() { return this->begin()+size(); } ++ typename MxBlock<T>::const_iterator end() const { return this->begin()+size(); } + + void push_back(const T& t) { add(t); } + }; diff --git a/graphics/qslim/files/patch-mixkit__src__MxStack.h b/graphics/qslim/files/patch-mixkit__src__MxStack.h new file mode 100644 index 000000000000..3368a868c4a4 --- /dev/null +++ b/graphics/qslim/files/patch-mixkit__src__MxStack.h @@ -0,0 +1,31 @@ +--- mixkit/src/MxStack.h.orig ++++ mixkit/src/MxStack.h +@@ -26,14 +26,14 @@ + MxStack(const T& val, unsigned int n) : MxDynBlock<T>(n) + { push(val); } + +- T& top() { return last(); } +- const T& top() const { return last(); } ++ T& top() { return this->last(); } ++ const T& top() const { return this->last(); } + +- bool is_empty() { return length()==0; } ++ bool is_empty() { return this->length()==0; } + +- T& pop() { return drop(); } ++ T& pop() { return this->drop(); } + +- void push(const T& val) { add(val); } ++ void push(const T& val) { this->add(val); } + // + // NOTE: In this code, it is *crucial* that we do the add() and + // assignment in separate steps. The obvious alternative +@@ -41,7 +41,7 @@ + // broken! The top() will grab a pointer into the block, + // but the add() may reallocate the block before doing the + // assignment. Thus, the pointer will become invalid. +- void push() { add(); top() = (*this)[length()-2]; } ++ void push() { this->add(); top() = (*this)[this->length()-2]; } + }; + + // MXSTACK_INCLUDED diff --git a/graphics/qslim/files/patch-tools-qslim_qvis.cxx b/graphics/qslim/files/patch-tools-qslim_qvis.cxx index 8e41e823c59f..7c1b7390dc5b 100644 --- a/graphics/qslim/files/patch-tools-qslim_qvis.cxx +++ b/graphics/qslim/files/patch-tools-qslim_qvis.cxx @@ -9,3 +9,12 @@ #include <FL/filename.H> #include <FL/filename.H> #include <FL/Fl_Slider.H> +@@ -228,7 +228,7 @@ + // Main application routine + // + +-main(int argc, char **argv) ++int main(int argc, char **argv) + { + // Change default values for application variables in GUI version + will_record_history = true; diff --git a/graphics/qslim/files/patch-tools__qslim__qslim.cxx b/graphics/qslim/files/patch-tools__qslim__qslim.cxx new file mode 100644 index 000000000000..040e35c6fc30 --- /dev/null +++ b/graphics/qslim/files/patch-tools__qslim__qslim.cxx @@ -0,0 +1,11 @@ +--- tools/qslim/qslim.cxx.orig ++++ tools/qslim/qslim.cxx +@@ -32,7 +32,7 @@ + output_preamble(); + } + +-main(int argc, char **argv) ++int main(int argc, char **argv) + { + double input_time, init_time, slim_time, output_time; + |