Commit 5555122a authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing the macro tnlAssert.

parent 23023484
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -15,12 +15,12 @@
using namespace std;

#define tnlAssert( ___tnl__assert_condition, ___tnl__assert_command )     \
	if( ! ___tnl__assert_condition )                                  \
	if( ! ( ___tnl__assert_condition ) )                                  \
	{                                                                 \
	cerr << "Assertion '___tnl__assert_condition' failed !!!" << endl \
             << "File: __FILE__" << endl                                  \
             << "Function: __PRETTY_FUNCTION__ " << endl                  \
             << "Line: __LINE__" << endl                                  \
	cerr << "Assertion '" << __STRING( ___tnl__assert_condition ) << "' failed !!!" << endl \
             << "File: " << __FILE__ << endl                                                \
             << "Function: " << __PRETTY_FUNCTION__ << endl                                 \
             << "Line: " << __LINE__ << endl                                                \
             << "Diagnostics: ";                                                            \
        ___tnl__assert_command;                                                             \
        exit( EXIT_FAILURE );                                                               \
+7 −7
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
   };
#else
   {
      cerr << "CUDA support is missing in this system." << endl;
      cerr << "CUDA support is missing on this system." << endl;
   }
#endif

@@ -92,7 +92,7 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
   };
#else
   {
      cerr << "CUDA support is missing in this system." << endl;
      cerr << "CUDA support is missing on this system." << endl;
   }
#endif

@@ -126,7 +126,7 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
   };
#else
   {
      cerr << "CUDA support is missing in this system." << endl;
      cerr << "CUDA support is missing on this system." << endl;
      return false;
   };
#endif
@@ -146,7 +146,7 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
   };
#else
   {
      cerr << "CUDA support is missing in this system." << endl;
      cerr << "CUDA support is missing on this system." << endl;
   };
#endif

@@ -187,7 +187,7 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
      }
      return true;
#else
      cerr << "CUDA support is missing in this system." << endl;
      cerr << "CUDA support is missing on this system." << endl;
      return false;
#endif
   };
@@ -206,7 +206,7 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
         cudaThreadSynchronize();
      return true;
#else
      cerr << "CUDA support is missing in this system." << endl;
      cerr << "CUDA support is missing on this system." << endl;
      return false;
#endif
   };
@@ -222,7 +222,7 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
            cerr << "Unable to free alocated memory of " << GetName() << "." << endl;
         }
#else
      cerr << "CUDA support is missing in this system." << endl;
      cerr << "CUDA support is missing on this system." << endl;
#endif
   };

+1 −1

File changed.

Contains only whitespace changes.