Skip to content

Commit

Permalink
utils.h: converted empty_if_null to template in attempt to fix ubun…
Browse files Browse the repository at this point in the history
…tu 23.10 CMake build
  • Loading branch information
firewave committed Mar 21, 2024
1 parent 35729c6 commit 538e8d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ namespace cppcheck
}
}

#define empty_if_null(p) p ? p : ""
template<typename T>
static inline T* empty_if_null(T* p)
{
return p ? p : "";
}

#endif

0 comments on commit 538e8d2

Please sign in to comment.