diff options
author | David Robillard <d@drobilla.net> | 2020-08-01 11:50:31 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-01 16:48:06 +0200 |
commit | 358c0a4140406c8c38138a88aa03a4fc0ec6e7ee (patch) | |
tree | 21a0c0397ca9bd8e67136c472d8146bb3a22a204 /src/URI.cpp | |
parent | b453818f17a84c01d679088e5a377e244a231981 (diff) | |
download | ingen-358c0a4140406c8c38138a88aa03a4fc0ec6e7ee.tar.gz ingen-358c0a4140406c8c38138a88aa03a4fc0ec6e7ee.tar.bz2 ingen-358c0a4140406c8c38138a88aa03a4fc0ec6e7ee.zip |
Use modern casts
Diffstat (limited to 'src/URI.cpp')
-rw-r--r-- | src/URI.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/URI.cpp b/src/URI.cpp index f7b64209..45d264f0 100644 --- a/src/URI.cpp +++ b/src/URI.cpp @@ -28,20 +28,24 @@ URI::URI() {} URI::URI(const std::string& str) - : _uri(SERD_URI_NULL) - , _node(serd_node_new_uri_from_string((const uint8_t*)str.c_str(), + : _uri(SERD_URI_NULL) + , _node(serd_node_new_uri_from_string(reinterpret_cast<const uint8_t*>( + str.c_str()), nullptr, &_uri)) {} URI::URI(const char* str) - : _uri(SERD_URI_NULL) - , _node(serd_node_new_uri_from_string((const uint8_t*)str, nullptr, &_uri)) + : _uri(SERD_URI_NULL) + , _node(serd_node_new_uri_from_string(reinterpret_cast<const uint8_t*>(str), + nullptr, + &_uri)) {} URI::URI(const std::string& str, const URI& base) - : _uri(SERD_URI_NULL) - , _node(serd_node_new_uri_from_string((const uint8_t*)str.c_str(), + : _uri(SERD_URI_NULL) + , _node(serd_node_new_uri_from_string(reinterpret_cast<const uint8_t*>( + str.c_str()), &base._uri, &_uri)) {} @@ -66,11 +70,12 @@ URI::URI(const Sord::Node& node) } URI::URI(const FilePath& path) - : _uri(SERD_URI_NULL) - , _node(serd_node_new_file_uri((const uint8_t*)path.c_str(), - nullptr, - &_uri, - true)) + : _uri(SERD_URI_NULL) + , _node( + serd_node_new_file_uri(reinterpret_cast<const uint8_t*>(path.c_str()), + nullptr, + &_uri, + true)) {} URI::URI(const URI& uri) |