42
42
#include " disp_sdl.h"
43
43
44
44
#include < algorithm>
45
+ #include < memory>
45
46
46
47
#include < boost/format.hpp>
47
48
@@ -54,7 +55,7 @@ namespace pov_frontend
54
55
using namespace vfe ;
55
56
using namespace vfePlatform ;
56
57
57
- extern shared_ptr<Display> gDisplay ;
58
+ extern std:: shared_ptr<Display> gDisplay ;
58
59
59
60
const UnixOptionsProcessor::Option_Info UnixSDLDisplay::Options[] =
60
61
{
@@ -181,8 +182,8 @@ namespace pov_frontend
181
182
// [JG] about testing vs ...(-1), have a look at SDL_ListModes API (the return is very ugly).
182
183
if ((modes != nullptr ) && (reinterpret_cast <SDL_Rect**>(-1 ) != modes))
183
184
{
184
- width = min (modes[0 ]->w - 10 , width);
185
- height = min (modes[0 ]->h - 80 , height);
185
+ width = std:: min (modes[0 ]->w - 10 , width);
186
+ height = std:: min (modes[0 ]->h - 80 , height);
186
187
}
187
188
}
188
189
@@ -250,7 +251,7 @@ namespace pov_frontend
250
251
* 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)
251
252
* where in such situation, the computed ratio is not exactly the same as the other.
252
253
*/
253
- m_display_scale = min (float (width) / GetWidth (), float (height) / GetHeight ());
254
+ m_display_scale = std:: min (float (width) / GetWidth (), float (height) / GetHeight ());
254
255
}
255
256
256
257
SetCaption (false );
@@ -345,10 +346,10 @@ namespace pov_frontend
345
346
{
346
347
unsigned int rx2 = m_update_rect.x + m_update_rect.w ;
347
348
unsigned int ry2 = m_update_rect.y + m_update_rect.h ;
348
- m_update_rect.x = min ((unsigned int )m_update_rect.x , x);
349
- m_update_rect.y = min ((unsigned int )m_update_rect.y , y);
350
- rx2 = max (rx2, x);
351
- ry2 = max (ry2, y);
349
+ m_update_rect.x = std:: min ((unsigned int )m_update_rect.x , x);
350
+ m_update_rect.y = std:: min ((unsigned int )m_update_rect.y , y);
351
+ rx2 = std:: max (rx2, x);
352
+ ry2 = std:: max (ry2, y);
352
353
m_update_rect.w = rx2 - m_update_rect.x ;
353
354
m_update_rect.h = ry2 - m_update_rect.y ;
354
355
}
@@ -357,10 +358,10 @@ namespace pov_frontend
357
358
{
358
359
unsigned int rx2 = m_update_rect.x + m_update_rect.w ;
359
360
unsigned int ry2 = m_update_rect.y + m_update_rect.h ;
360
- m_update_rect.x = min ((unsigned int )m_update_rect.x , x1);
361
- m_update_rect.y = min ((unsigned int )m_update_rect.y , y1 );
362
- rx2 = max (rx2, x2);
363
- ry2 = max (ry2, y2);
361
+ m_update_rect.x = std:: min ((unsigned int )m_update_rect.x , x1);
362
+ m_update_rect.y = std:: min ((unsigned int )m_update_rect.y , y1 );
363
+ rx2 = std:: max (rx2, x2);
364
+ ry2 = std:: max (ry2, y2);
364
365
m_update_rect.w = rx2 - m_update_rect.x ;
365
366
m_update_rect.h = ry2 - m_update_rect.y ;
366
367
}
@@ -405,10 +406,10 @@ namespace pov_frontend
405
406
if (!m_valid)
406
407
return ;
407
408
408
- int ix1 = min (x1, GetWidth ()-1 );
409
- int ix2 = min (x2, GetWidth ()-1 );
410
- int iy1 = min (y1 , GetHeight ()-1 );
411
- int iy2 = min (y2, GetHeight ()-1 );
409
+ int ix1 = std:: min (x1, GetWidth ()-1 );
410
+ int ix2 = std:: min (x2, GetWidth ()-1 );
411
+ int iy1 = std:: min (y1 , GetHeight ()-1 );
412
+ int iy2 = std:: min (y2, GetHeight ()-1 );
412
413
413
414
if (SDL_MUSTLOCK (m_display) && SDL_LockSurface (m_display) < 0 )
414
415
return ;
@@ -455,10 +456,10 @@ namespace pov_frontend
455
456
if (!m_valid)
456
457
return ;
457
458
458
- unsigned int ix1 = min (x1, GetWidth ()-1 );
459
- unsigned int ix2 = min (x2, GetWidth ()-1 );
460
- unsigned int iy1 = min (y1 , GetHeight ()-1 );
461
- unsigned int iy2 = min (y2, GetHeight ()-1 );
459
+ unsigned int ix1 = std:: min (x1, GetWidth ()-1 );
460
+ unsigned int ix2 = std:: min (x2, GetWidth ()-1 );
461
+ unsigned int iy1 = std:: min (y1 , GetHeight ()-1 );
462
+ unsigned int iy2 = std:: min (y2, GetHeight ()-1 );
462
463
463
464
if (m_display_scaled)
464
465
{
@@ -487,10 +488,10 @@ namespace pov_frontend
487
488
if (!m_valid)
488
489
return ;
489
490
490
- unsigned int ix1 = min (x1, GetWidth ()-1 );
491
- unsigned int ix2 = min (x2, GetWidth ()-1 );
492
- unsigned int iy1 = min (y1 , GetHeight ()-1 );
493
- unsigned int iy2 = min (y2, GetHeight ()-1 );
491
+ unsigned int ix1 = std:: min (x1, GetWidth ()-1 );
492
+ unsigned int ix2 = std:: min (x2, GetWidth ()-1 );
493
+ unsigned int iy1 = std:: min (y1 , GetHeight ()-1 );
494
+ unsigned int iy2 = std:: min (y2, GetHeight ()-1 );
494
495
495
496
if (SDL_MUSTLOCK (m_display) && SDL_LockSurface (m_display) < 0 )
496
497
return ;
0 commit comments