Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions include/geode/basic/library.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,18 @@
{ \
} \
\
template < typename DataProvider, typename MessageProvider > \
template < typename DataProvider, \
typename MessageProvider, \
typename ExceptionClass = project_name##library_name##Exception > \
static void exception( bool condition, \
DataProvider&& data_provider, \
TYPE type, \
MessageProvider&& message_provider ) \
{ \
if( ABSL_PREDICT_FALSE( !( condition ) ) ) \
{ \
throw project_name##library_name##Exception{ data_provider(), \
type, message_provider() }; \
throw ExceptionClass{ data_provider(), type, \
message_provider() }; \
} \
} \
\
Expand Down Expand Up @@ -125,7 +127,7 @@
} \
}

#define check_assertion( condition, ... ) \

Check warning on line 130 in include/geode/basic/library.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/library.hpp:130:9 [readability-identifier-naming]

invalid case style for macro definition 'check_assertion'

Check warning on line 130 in include/geode/basic/library.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/library.hpp:130:9 [cppcoreguidelines-macro-usage]

variadic macro 'check_assertion' used; consider using a 'constexpr' variadic template function
assertion( \
[&] { \
return ( condition ); \
Expand All @@ -134,7 +136,7 @@
return absl::StrCat( __VA_ARGS__ ); \
} )

#define check_exception( condition, data, type, ... ) \

Check warning on line 139 in include/geode/basic/library.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/library.hpp:139:9 [readability-identifier-naming]

invalid case style for macro definition 'check_exception'

Check warning on line 139 in include/geode/basic/library.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/library.hpp:139:9 [cppcoreguidelines-macro-usage]

variadic macro 'check_exception' used; consider using a 'constexpr' variadic template function
exception( ( condition ), \
[&]() -> std::any { \
return ( data ); \
Expand All @@ -153,4 +155,4 @@

namespace geode
{
OPENGEODE_LIBRARY( opengeode_basic_api, OpenGeode, Basic );

Check warning on line 158 in include/geode/basic/library.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/library.hpp:158:5 [cppcoreguidelines-missing-std-forward]

forwarding reference parameter 'message_provider' is never forwarded inside the function body

Check warning on line 158 in include/geode/basic/library.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/library.hpp:158:5 [cppcoreguidelines-missing-std-forward]

forwarding reference parameter 'data_provider' is never forwarded inside the function body

Check warning on line 158 in include/geode/basic/library.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/library.hpp:158:5 [cppcoreguidelines-missing-std-forward]

forwarding reference parameter 'condition' is never forwarded inside the function body

Check warning on line 158 in include/geode/basic/library.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

include/geode/basic/library.hpp:158:5 [concurrency-mt-unsafe]

function is not thread safe
Expand Down
Loading