summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Szmigin <smidge@xsco.net>2020-08-21 14:01:32 +0100
committerGitHub <noreply@github.com>2020-08-21 14:01:32 +0100
commite5ef4de7e5cee2454c82b2f8215a36dad7d4f4a9 (patch)
tree028460e5518199f044c563893cfc980add991733
parentf14366864b6d66fc69741141acbb4e66b88d9854 (diff)
parent7c6fdedd5fbdb7c27c7ae6124055c55c0940a615 (diff)
Merge pull request #22 from xsco/fix/std-experimental-optional-alias
Fix/std experimental optional alias
-rw-r--r--include/djinterop/optional.hpp7
-rw-r--r--src/djinterop/enginelibrary/el_database_impl.cpp2
2 files changed, 6 insertions, 3 deletions
diff --git a/include/djinterop/optional.hpp b/include/djinterop/optional.hpp
index 6795913..baf4773 100644
--- a/include/djinterop/optional.hpp
+++ b/include/djinterop/optional.hpp
@@ -21,7 +21,7 @@
#include <djinterop/config.hpp>
-#ifdef DJINTEROP_STD_OPTIONAL
+#if defined DJINTEROP_STD_OPTIONAL
#include <optional>
@@ -39,7 +39,8 @@ using std::optional;
} // namespace stdx
} // namespace djinterop
-#elif DJINTEROP_STD_EXPERIMENTAL_OPTIONAL
+#elif defined DJINTEROP_STD_EXPERIMENTAL_OPTIONAL
+
#include <experimental/optional>
namespace djinterop
@@ -57,7 +58,9 @@ using std::experimental::optional;
} // namespace djinterop
#else
+
#error This library requires support for optional<T>, but none was found
+
#endif
#endif // DJINTEROP_OPTIONAL_HPP
diff --git a/src/djinterop/enginelibrary/el_database_impl.cpp b/src/djinterop/enginelibrary/el_database_impl.cpp
index ac723d9..bb82e24 100644
--- a/src/djinterop/enginelibrary/el_database_impl.cpp
+++ b/src/djinterop/enginelibrary/el_database_impl.cpp
@@ -178,7 +178,7 @@ track el_database_impl::create_track(std::string relative_path)
case 15:
case 16:
// Always 1 to our knowledge
- text = "1";
+ text = std::string{"1"};
break;
}
metadata_str_inserter << id << type << text;