summaryrefslogtreecommitdiff
path: root/src/lib/string_text_file.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-11-01 23:40:01 +0100
committerCarl Hetherington <cth@carlh.net>2020-11-02 23:10:04 +0100
commit6fa9748f382302fa88292b4219598bb81edc7bd0 (patch)
tree83f0859c934da2293913efb2c5ba029526e5634d /src/lib/string_text_file.cc
parentb639b7b20f1ab341194bcd5c76700ca419254d11 (diff)
Replace dcp::Data with dcp::ArrayData
Diffstat (limited to 'src/lib/string_text_file.cc')
-rw-r--r--src/lib/string_text_file.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/string_text_file.cc b/src/lib/string_text_file.cc
index d3c56832d..793619003 100644
--- a/src/lib/string_text_file.cc
+++ b/src/lib/string_text_file.cc
@@ -38,7 +38,7 @@ using std::string;
using boost::shared_ptr;
using boost::scoped_array;
using boost::optional;
-using dcp::Data;
+using dcp::ArrayData;
using namespace dcpomatic;
StringTextFile::StringTextFile (shared_ptr<const StringTextFileContent> content)
@@ -64,11 +64,11 @@ StringTextFile::StringTextFile (shared_ptr<const StringTextFileContent> content)
} else {
/* Text-based file; sort out its character encoding before we try to parse it */
- Data in (content->path (0));
+ ArrayData in (content->path (0));
UErrorCode status = U_ZERO_ERROR;
UCharsetDetector* detector = ucsdet_open (&status);
- ucsdet_setText (detector, reinterpret_cast<const char *> (in.data().get()), in.size(), &status);
+ ucsdet_setText (detector, reinterpret_cast<const char *>(in.data()), in.size(), &status);
UCharsetMatch const * match = ucsdet_detect (detector, &status);
char const * in_charset = ucsdet_getName (match, &status);
@@ -78,7 +78,7 @@ StringTextFile::StringTextFile (shared_ptr<const StringTextFileContent> content)
scoped_array<uint16_t> utf16 (new uint16_t[in.size() * 2]);
int const utf16_len = ucnv_toUChars (
to_utf16, reinterpret_cast<UChar*>(utf16.get()), in.size() * 2,
- reinterpret_cast<const char *> (in.data().get()), in.size(),
+ reinterpret_cast<const char *>(in.data()), in.size(),
&status
);