88// / @parblock
99// /
1010// / Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11- // / Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
11+ // / Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1212// /
1313// / POV-Ray is free software: you can redistribute it and/or modify
1414// / it under the terms of the GNU Affero General Public License as
@@ -161,10 +161,10 @@ void RenderFrontendBase::ConnectToBackend(POVMSAddress backendaddress, POVMS_Obj
161161
162162 backendaddresses.insert (backendaddress);
163163
164- if (resultobj != NULL )
164+ if (resultobj != nullptr )
165165 *resultobj = result;
166166
167- if (console != NULL )
167+ if (console != nullptr )
168168 Message2Console::InitInfo (result, console.get ());
169169}
170170
@@ -355,7 +355,7 @@ void RenderFrontendBase::StartParser(SceneData& shd, SceneId sid, POVMS_Object&
355355 msg.SetDestinationAddress (sid.GetAddress ());
356356 msg.SetInt (kPOVAttrib_SceneId , sid.GetIdentifier ());
357357
358- POVMS_SendMessage (context, msg, NULL , kPOVMSSendMode_NoReply );
358+ POVMS_SendMessage (context, msg, nullptr , kPOVMSSendMode_NoReply );
359359
360360 shd.state = SceneData::Scene_Parsing;
361361}
@@ -483,7 +483,7 @@ void RenderFrontendBase::StartRender(ViewData& vhd, ViewId vid, POVMS_Object& ob
483483 msg.SetDestinationAddress (vid.GetAddress ());
484484 msg.SetInt (kPOVAttrib_ViewId , vid.GetIdentifier ());
485485
486- POVMS_SendMessage (context, msg, NULL , kPOVMSSendMode_NoReply );
486+ POVMS_SendMessage (context, msg, nullptr , kPOVMSSendMode_NoReply );
487487
488488 vhd.state = ViewData::View_Rendering;
489489}
@@ -605,7 +605,7 @@ void RenderFrontendBase::NewBackup(POVMS_Object& ropts, ViewData& vd, const Path
605605 if (!pov_base::PlatformBase::GetInstance ().AllowLocalFileAccess (vd.imageBackupFile (), POV_File_Data_Backup, true ))
606606 throw POV_EXCEPTION (kCannotOpenFileErr , " Permission denied to create render state output file." );
607607 vd.imageBackup = shared_ptr<OStream>(new OStream (vd.imageBackupFile ().c_str ()));
608- if (vd.imageBackup != NULL )
608+ if (vd.imageBackup != nullptr )
609609 {
610610 Backup_File_Header hdr;
611611
@@ -648,7 +648,7 @@ void RenderFrontendBase::ContinueBackup(POVMS_Object& ropts, ViewData& vd, ViewI
648648
649649 size_t pos = sizeof (Backup_File_Header);
650650
651- if (inbuffer != NULL )
651+ if (inbuffer != nullptr )
652652 {
653653 Backup_File_Header hdr;
654654
@@ -663,7 +663,7 @@ void RenderFrontendBase::ContinueBackup(POVMS_Object& ropts, ViewData& vd, ViewI
663663 // since they are generally useful. therefore we explicitly check
664664 // for the end of the file.
665665 inbuffer->seekg (0 , IOBase::seek_end);
666- POV_LONG end = inbuffer->tellg ();
666+ POV_OFF_T end = inbuffer->tellg ();
667667 inbuffer->seekg (0 , IOBase::seek_set);
668668
669669 if (inbuffer->read (&hdr, sizeof (hdr)) == false )
@@ -720,13 +720,13 @@ void RenderFrontendBase::ContinueBackup(POVMS_Object& ropts, ViewData& vd, ViewI
720720 if (outputToFile == true )
721721 {
722722 vd.imageBackup = shared_ptr<OStream>(new OStream (vd.imageBackupFile ().c_str (), IOBase::append));
723- if (vd.imageBackup != NULL )
723+ if (vd.imageBackup != nullptr )
724724 {
725725 if (!*vd.imageBackup )
726726 throw POV_EXCEPTION (kCannotOpenFileErr , " Cannot append to state output file." );
727727
728728 vd.imageBackup ->seekg (0 , IOBase::seek_end);
729- vd.imageBackup ->seekg (min ((POV_LONG )pos, vd.imageBackup ->tellg ()), IOBase::seek_set);
729+ vd.imageBackup ->seekg (min ((POV_OFF_T )pos, vd.imageBackup ->tellg ()), IOBase::seek_set);
730730 }
731731 else
732732 throw POV_EXCEPTION (kCannotOpenFileErr , " Cannot create state output file stream." );
@@ -1228,37 +1228,37 @@ void OutputOptions(POVMS_Object& cppmsg, TextStreamBuffer *tsb)
12281228 tsb->printf (" Information Output Options\n " );
12291229
12301230 tsb->printf (" All Streams to console.........%s" , GetOptionSwitchString (msg, kPOVAttrib_AllConsole , true ));
1231- // if(streamnames[ALL_STREAM] != NULL )
1231+ // if (streamnames[ALL_STREAM] != nullptr )
12321232// tsb->printf(" and file %s\n", streamnames[ALL_STREAM]);
12331233// else
12341234 tsb->printf (" \n " );
12351235
12361236 tsb->printf (" Debug Stream to console........%s" , GetOptionSwitchString (msg, kPOVAttrib_DebugConsole , true ));
1237- // if(streamnames[DEBUG_STREAM] != NULL )
1237+ // if (streamnames[DEBUG_STREAM] != nullptr )
12381238// tsb->printf(" and file %s\n", streamnames[DEBUG_STREAM]);
12391239// else
12401240 tsb->printf (" \n " );
12411241
12421242 tsb->printf (" Fatal Stream to console........%s" , GetOptionSwitchString (msg, kPOVAttrib_FatalConsole , true ));
1243- // if(streamnames[FATAL_STREAM] != NULL )
1243+ // if (streamnames[FATAL_STREAM] != nullptr )
12441244// tsb->printf(" and file %s\n", streamnames[FATAL_STREAM]);
12451245// else
12461246 tsb->printf (" \n " );
12471247
12481248 tsb->printf (" Render Stream to console.......%s" , GetOptionSwitchString (msg, kPOVAttrib_RenderConsole , true ));
1249- // if(streamnames[RENDER_STREAM] != NULL )
1249+ // if (streamnames[RENDER_STREAM] != nullptr )
12501250// tsb->printf(" and file %s\n", streamnames[RENDER_STREAM]);
12511251// else
12521252 tsb->printf (" \n " );
12531253
12541254 tsb->printf (" Statistics Stream to console...%s" , GetOptionSwitchString (msg, kPOVAttrib_StatisticsConsole , true ));
1255- // if(streamnames[STATISTIC_STREAM] != NULL )
1255+ // if (streamnames[STATISTIC_STREAM] != nullptr )
12561256// tsb->printf(" and file %s\n", streamnames[STATISTIC_STREAM]);
12571257// else
12581258 tsb->printf (" \n " );
12591259
12601260 tsb->printf (" Warning Stream to console......%s" , GetOptionSwitchString (msg, kPOVAttrib_WarningConsole , true ));
1261- // if(streamnames[WARNING_STREAM] != NULL )
1261+ // if (streamnames[WARNING_STREAM] != nullptr )
12621262// tsb->printf(" and file %s\n", streamnames[WARNING_STREAM]);
12631263// else
12641264 tsb->printf (" \n " );
0 commit comments