mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: remove __cplusplus ifdefs
Since all source files are now C++, this is redundant. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9065bf8622
commit
03b910ee7f
55 changed files with 37 additions and 347 deletions
|
@ -5,10 +5,11 @@
|
|||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// string handling
|
||||
|
||||
|
@ -35,13 +36,8 @@ static inline char *copy_string(const char *s)
|
|||
extern double permissive_strtod(const char *str, const char **ptr);
|
||||
extern double ascii_strtod(const char *str, const char **ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
// Sadly, starts_with only with C++20!
|
||||
inline bool starts_with(std::string_view s, const char *s2)
|
||||
{
|
||||
|
@ -56,6 +52,4 @@ inline bool contains(std::string_view s, char c)
|
|||
|
||||
std::string join(const std::vector<std::string> &l, const std::string &separator, bool skip_empty = false);
|
||||
|
||||
#endif
|
||||
|
||||
#endif // SUBSURFACE_STRING_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue