From b62224c6139c0d324979b48b3ac4645f75a82c82 Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Mon, 24 Feb 2020 10:01:09 +0100
Subject: [PATCH] Use nullptr instead of 0 for pointer type stream_t

---
 pystencils_walberla/templates/Sweep.tmpl.h           |  8 ++++----
 pystencils_walberla/templates/SweepInnerOuter.tmpl.h | 12 ++++++------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/pystencils_walberla/templates/Sweep.tmpl.h b/pystencils_walberla/templates/Sweep.tmpl.h
index 9de4b96..b4db0f3 100644
--- a/pystencils_walberla/templates/Sweep.tmpl.h
+++ b/pystencils_walberla/templates/Sweep.tmpl.h
@@ -57,10 +57,10 @@ public:
 
     {{ kernel| generate_destructor(class_name) |indent(4) }}
 
-    void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} );
+    void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} );
     void runOnCellInterval(const shared_ptr<StructuredBlockStorage> & blocks,
                            const CellInterval & globalCellInterval, cell_idx_t ghostLayers, IBlock * block
-                           {%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %});
+                           {%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %});
 
 
 
@@ -74,8 +74,8 @@ public:
                                    const CellInterval & globalCellInterval,
                                    cell_idx_t ghostLayers=1 )
     {
-        return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %}) {
-            kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%},stream {% endif %});
+        return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %}) {
+            kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%}, stream {% endif %});
         };
     }
 
diff --git a/pystencils_walberla/templates/SweepInnerOuter.tmpl.h b/pystencils_walberla/templates/SweepInnerOuter.tmpl.h
index cf7ef4b..6f6094d 100644
--- a/pystencils_walberla/templates/SweepInnerOuter.tmpl.h
+++ b/pystencils_walberla/templates/SweepInnerOuter.tmpl.h
@@ -60,11 +60,11 @@ public:
     {{ kernel| generate_destructor(class_name) |indent(4) }}
 
 
-    void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} );
+    void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} );
 
     void runOnCellInterval(const shared_ptr<StructuredBlockStorage> & blocks,
                            const CellInterval & globalCellInterval, cell_idx_t ghostLayers, IBlock * block
-                           {%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %});
+                           {%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %});
 
 
 
@@ -78,14 +78,14 @@ public:
                                    const CellInterval & globalCellInterval,
                                    cell_idx_t ghostLayers=1 )
     {
-        return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %}) {
-            kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%},stream {% endif %});
+        return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %}) {
+            kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%}, stream {% endif %});
         };
     }
 
 
-    void inner( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} );
-    void outer( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} );
+    void inner( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} );
+    void outer( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} );
 
     void setOuterPriority(int priority ) {
         {%if target is equalto 'gpu'%}
-- 
GitLab