|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
New version:
https://github.com/POV-Ray/povray/releases/tag/v3.8.0-alpha.10064268
One bug fix ("uncategorized error" in nested array initializers),
various changes under the hood, mostly related to migration towards more
extensive use of C++11 features.
One major such change is that we no longer need to link any of the boost
libraries (though we still need a couple of boost header-only libraries).
Also, build speed has been increased a bit, and modern clang versions
will no longer issue a flood of warnings.
Please test and enjoy!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 2/18/19 10:22 PM, clipka wrote:
> New version:
>
> https://github.com/POV-Ray/povray/releases/tag/v3.8.0-alpha.10064268
>
> One bug fix ("uncategorized error" in nested array initializers),
> various changes under the hood, mostly related to migration towards more
> extensive use of C++11 features.
>
> One major such change is that we no longer need to link any of the boost
> libraries (though we still need a couple of boost header-only libraries).
>
> Also, build speed has been increased a bit, and modern clang versions
> will no longer issue a flood of warnings.
>
> Please test and enjoy!
It doesn't compile for me. Below is the last part of the console session:
----------[BEGIN MESSAGES]----------
Making all in unix
make[2]: Entering directory
'/home/ricky/povray/povray-3.8.0-alpha.10064268/unix'
depbase=`echo disp_sdl.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I.. -I../unix/povconfig -I.. -I../source
-I../source -I../platform/unix -I../platform/x86 -I../vfe -I../vfe/unix
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/OpenEXR
-I/usr/include -pipe -Wno-multichar -Wno-write-strings
-fno-enforce-eh-specs -Wno-non-template-friend -Wsuggest-override -s -O3
-ffast-math -march=native -pthread -MT disp_sdl.o -MD -MP -MF
$depbase.Tpo -c -o disp_sdl.o disp_sdl.cpp &&\
mv -f $depbase.Tpo $depbase.Po
disp_sdl.cpp:57:12: error: ‘shared_ptr’ does not name a type; did you
mean ‘char16_t’?
extern shared_ptr<Display> gDisplay;
^~~~~~~~~~
char16_t
disp_sdl.cpp: In member function ‘virtual void
pov_frontend::UnixSDLDisplay::Show()’:
disp_sdl.cpp:184:29: error: ‘min’ was not declared in this scope
width = min(modes[0]->w - 10, width);
^~~
disp_sdl.cpp:184:29: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function.hpp:30,
from ../source/frontend/renderfrontend.h:55,
from ../vfe/vfe.h:58,
from disp_sdl.h:45,
from disp_sdl.cpp:42:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: ‘std::min’
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
disp_sdl.cpp:253:35: error: ‘min’ was not declared in this scope
m_display_scale = min(float(width) / GetWidth(),
float(height) / GetHeight());
^~~
disp_sdl.cpp:253:35: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function.hpp:30,
from ../source/frontend/renderfrontend.h:55,
from ../vfe/vfe.h:58,
from disp_sdl.h:45,
from disp_sdl.cpp:42:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: ‘std::min’
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
disp_sdl.cpp: In member function ‘void
pov_frontend::UnixSDLDisplay::UpdateCoord(unsigned int, unsigned int)’:
disp_sdl.cpp:348:27: error: ‘min’ was not declared in this scope
m_update_rect.x = min((unsigned int)m_update_rect.x, x);
^~~
disp_sdl.cpp:348:27: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function.hpp:30,
from ../source/frontend/renderfrontend.h:55,
from ../vfe/vfe.h:58,
from disp_sdl.h:45,
from disp_sdl.cpp:42:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: ‘std::min’
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
disp_sdl.cpp:350:15: error: ‘max’ was not declared in this scope
rx2 = max(rx2, x);
^~~
disp_sdl.cpp:350:15: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function.hpp:30,
from ../source/frontend/renderfrontend.h:55,
from ../vfe/vfe.h:58,
from disp_sdl.h:45,
from disp_sdl.cpp:42:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: ‘std::max’
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
disp_sdl.cpp: In member function ‘void
pov_frontend::UnixSDLDisplay::UpdateCoord(unsigned int, unsigned int,
unsigned int, unsigned int)’:
disp_sdl.cpp:360:27: error: ‘min’ was not declared in this scope
m_update_rect.x = min((unsigned int)m_update_rect.x, x1);
^~~
disp_sdl.cpp:360:27: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function.hpp:30,
from ../source/frontend/renderfrontend.h:55,
from ../vfe/vfe.h:58,
from disp_sdl.h:45,
from disp_sdl.cpp:42:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: ‘std::min’
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
disp_sdl.cpp:362:15: error: ‘max’ was not declared in this scope
rx2 = max(rx2, x2);
^~~
disp_sdl.cpp:362:15: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function.hpp:30,
from ../source/frontend/renderfrontend.h:55,
from ../vfe/vfe.h:58,
from disp_sdl.h:45,
from disp_sdl.cpp:42:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: ‘std::max’
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
disp_sdl.cpp: In member function ‘virtual void
pov_frontend::UnixSDLDisplay::DrawRectangleFrame(unsigned int, unsigned
int, unsigned int, unsigned int, const pov_frontend::Display::RGBA8&)’:
disp_sdl.cpp:408:19: error: ‘min’ was not declared in this scope
int ix1 = min(x1, GetWidth()-1);
^~~
disp_sdl.cpp:408:19: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function.hpp:30,
from ../source/frontend/renderfrontend.h:55,
from ../vfe/vfe.h:58,
from disp_sdl.h:45,
from disp_sdl.cpp:42:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: ‘std::min’
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
disp_sdl.cpp: In member function ‘virtual void
pov_frontend::UnixSDLDisplay::DrawFilledRectangle(unsigned int, unsigned
int, unsigned int, unsigned int, const pov_frontend::Display::RGBA8&)’:
disp_sdl.cpp:458:28: error: ‘min’ was not declared in this scope
unsigned int ix1 = min(x1, GetWidth()-1);
^~~
disp_sdl.cpp:458:28: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function.hpp:30,
from ../source/frontend/renderfrontend.h:55,
from ../vfe/vfe.h:58,
from disp_sdl.h:45,
from disp_sdl.cpp:42:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: ‘std::min’
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
disp_sdl.cpp: In member function ‘virtual void
pov_frontend::UnixSDLDisplay::DrawPixelBlock(unsigned int, unsigned int,
unsigned int, unsigned int, const pov_frontend::Display::RGBA8*)’:
disp_sdl.cpp:490:28: error: ‘min’ was not declared in this scope
unsigned int ix1 = min(x1, GetWidth()-1);
^~~
disp_sdl.cpp:490:28: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/function/detail/prologue.hpp:13,
from /usr/include/boost/function.hpp:30,
from ../source/frontend/renderfrontend.h:55,
from ../vfe/vfe.h:58,
from disp_sdl.h:45,
from disp_sdl.cpp:42:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: ‘std::min’
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
make[2]: *** [Makefile:487: disp_sdl.o] Error 1
make[2]: Leaving directory
'/home/ricky/povray/povray-3.8.0-alpha.10064268/unix'
make[1]: *** [Makefile:668: all-recursive] Error 1
make[1]: Leaving directory '/home/ricky/povray/povray-3.8.0-alpha.10064268'
make: *** [Makefile:461: all] Error 2
-----------[END MESSAGES]-----------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 19.02.2019 um 04:55 schrieb Cousin Ricky:
> It doesn't compile for me. Below is the last part of the console session:
Please try prepending all `shared_ptr`, `min` and `max` in the file
`unix/disp_sdl.cpp` with `std::`, and adding `#include <memory>` to the
top of the file.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 2019-19-02 12:17 AM (-4), clipka wrote:
> Am 19.02.2019 um 04:55 schrieb Cousin Ricky:
>
>> It doesn't compile for me. Below is the last part of the console
>> session:
>
> Please try prepending all `shared_ptr`, `min` and `max` in the file
> `unix/disp_sdl.cpp` with `std::`, and adding `#include <memory>` to the
> top of the file.
It worked. Thank you.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
Cousin Ricky <ric### [at] yahoocom> wrote:
> On 2019-19-02 12:17 AM (-4), clipka wrote:
> > Am 19.02.2019 um 04:55 schrieb Cousin Ricky:
> >> It doesn't compile for me. Below is the last part of the console
> >> session:
> >
> > Please try prepending all `shared_ptr`, `min` and `max` in the file
> > `unix/disp_sdl.cpp` with `std::`, and adding `#include <memory>` to the
> > top of the file.
>
> It worked. Thank you.
and for me, thanks. including the diff below, in case it's of use to someone
else. to apply copy+paste to file, then run "patch -p0 < patch20190219".
regards, jr.
-----<snip>-----
--- unix/disp_sdl.cpp 2019-02-19 01:48:21.000000000 +0000
+++ unix/disp_sdl.cpp 2019-11-28 10:52:31.218265290 +0000
@@ -42,6 +42,7 @@
#include "disp_sdl.h"
#include <algorithm>
+#include <memory>
#include <boost/format.hpp>
@@ -54,7 +55,7 @@
using namespace vfe;
using namespace vfePlatform;
- extern shared_ptr<Display> gDisplay;
+ extern std::shared_ptr<Display> gDisplay;
const UnixOptionsProcessor::Option_Info UnixSDLDisplay::Options[] =
{
@@ -181,8 +182,8 @@
// [JG] about testing vs ...(-1), have a look at SDL_ListModes
API (the return is very ugly).
if ((modes != nullptr) && (reinterpret_cast<SDL_Rect**>(-1) !=
modes))
{
- width = min(modes[0]->w - 10, width);
- height = min(modes[0]->h - 80, height);
+ width = std::min(modes[0]->w - 10, width);
+ height = std::min(modes[0]->h - 80, height);
}
}
@@ -250,7 +251,7 @@
* The difference is nearly invisible until the values of
GetWidth and GetHeight are subtil (such as +W2596 +H1003 on a display of 1920 x
1080)
* where in such situation, the computed ratio is not exactly
the same as the other.
*/
- m_display_scale = min(float(width) / GetWidth(), float(height)
/ GetHeight());
+ m_display_scale = std::min(float(width) / GetWidth(),
float(height) / GetHeight());
}
SetCaption(false);
@@ -345,10 +346,10 @@
{
unsigned int rx2 = m_update_rect.x + m_update_rect.w;
unsigned int ry2 = m_update_rect.y + m_update_rect.h;
- m_update_rect.x = min((unsigned int)m_update_rect.x, x);
- m_update_rect.y = min((unsigned int)m_update_rect.y, y);
- rx2 = max(rx2, x);
- ry2 = max(ry2, y);
+ m_update_rect.x = std::min((unsigned int)m_update_rect.x, x);
+ m_update_rect.y = std::min((unsigned int)m_update_rect.y, y);
+ rx2 = std::max(rx2, x);
+ ry2 = std::max(ry2, y);
m_update_rect.w = rx2 - m_update_rect.x;
m_update_rect.h = ry2 - m_update_rect.y;
}
@@ -357,10 +358,10 @@
{
unsigned int rx2 = m_update_rect.x + m_update_rect.w;
unsigned int ry2 = m_update_rect.y + m_update_rect.h;
- m_update_rect.x = min((unsigned int)m_update_rect.x, x1);
- m_update_rect.y = min((unsigned int)m_update_rect.y, y1);
- rx2 = max(rx2, x2);
- ry2 = max(ry2, y2);
+ m_update_rect.x = std::min((unsigned int)m_update_rect.x, x1);
+ m_update_rect.y = std::min((unsigned int)m_update_rect.y, y1);
+ rx2 = std::max(rx2, x2);
+ ry2 = std::max(ry2, y2);
m_update_rect.w = rx2 - m_update_rect.x;
m_update_rect.h = ry2 - m_update_rect.y;
}
@@ -405,10 +406,10 @@
if (!m_valid)
return;
- int ix1 = min(x1, GetWidth()-1);
- int ix2 = min(x2, GetWidth()-1);
- int iy1 = min(y1, GetHeight()-1);
- int iy2 = min(y2, GetHeight()-1);
+ int ix1 = std::min(x1, GetWidth()-1);
+ int ix2 = std::min(x2, GetWidth()-1);
+ int iy1 = std::min(y1, GetHeight()-1);
+ int iy2 = std::min(y2, GetHeight()-1);
if (SDL_MUSTLOCK(m_display) && SDL_LockSurface(m_display) < 0)
return;
@@ -455,10 +456,10 @@
if (!m_valid)
return;
- unsigned int ix1 = min(x1, GetWidth()-1);
- unsigned int ix2 = min(x2, GetWidth()-1);
- unsigned int iy1 = min(y1, GetHeight()-1);
- unsigned int iy2 = min(y2, GetHeight()-1);
+ unsigned int ix1 = std::min(x1, GetWidth()-1);
+ unsigned int ix2 = std::min(x2, GetWidth()-1);
+ unsigned int iy1 = std::min(y1, GetHeight()-1);
+ unsigned int iy2 = std::min(y2, GetHeight()-1);
if (m_display_scaled)
{
@@ -487,10 +488,10 @@
if (!m_valid)
return;
- unsigned int ix1 = min(x1, GetWidth()-1);
- unsigned int ix2 = min(x2, GetWidth()-1);
- unsigned int iy1 = min(y1, GetHeight()-1);
- unsigned int iy2 = min(y2, GetHeight()-1);
+ unsigned int ix1 = std::min(x1, GetWidth()-1);
+ unsigned int ix2 = std::min(x2, GetWidth()-1);
+ unsigned int iy1 = std::min(y1, GetHeight()-1);
+ unsigned int iy2 = std::min(y2, GetHeight()-1);
if (SDL_MUSTLOCK(m_display) && SDL_LockSurface(m_display) < 0)
return;
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|