summaryrefslogtreecommitdiffstats
path: root/src/Data.cpp
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2024-05-13 19:38:22 +0200
committerGravatar Nikias Bassen2024-05-13 19:38:22 +0200
commit1327c87bf92f1d51286e3172c1047a8a47c5ee3a (patch)
tree8edf522f2d5b749027810c73b55270a3d3477dc3 /src/Data.cpp
parent06877b5ecb9704baded1160a149912fad8141a39 (diff)
downloadlibplist-1327c87bf92f1d51286e3172c1047a8a47c5ee3a.tar.gz
libplist-1327c87bf92f1d51286e3172c1047a8a47c5ee3a.tar.bz2
Revert "Change API around #PLIST_DATA to use uint8_t instead of char arrays"
This reverts commit a91f5740d100414a76959714b819422ee5b2d8a8.
Diffstat (limited to 'src/Data.cpp')
-rw-r--r--src/Data.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Data.cpp b/src/Data.cpp
index c4709f7..a96fc50 100644
--- a/src/Data.cpp
+++ b/src/Data.cpp
@@ -34,7 +34,7 @@ Data::Data(plist_t node, Node* parent) : Node(node, parent)
Data::Data(const PList::Data& d) : Node(PLIST_DATA)
{
- std::vector<uint8_t> b = d.GetValue();
+ std::vector<char> b = d.GetValue();
plist_set_data_val(_node, &b[0], b.size());
}
@@ -45,7 +45,7 @@ Data& Data::operator=(const PList::Data& b)
return *this;
}
-Data::Data(const std::vector<uint8_t>& buff) : Node(PLIST_DATA)
+Data::Data(const std::vector<char>& buff) : Node(PLIST_DATA)
{
plist_set_data_val(_node, &buff[0], buff.size());
}
@@ -59,17 +59,17 @@ Node* Data::Clone() const
return new Data(*this);
}
-void Data::SetValue(const std::vector<uint8_t>& buff)
+void Data::SetValue(const std::vector<char>& buff)
{
plist_set_data_val(_node, &buff[0], buff.size());
}
-std::vector<uint8_t> Data::GetValue() const
+std::vector<char> Data::GetValue() const
{
- uint8_t* buff = NULL;
+ char* buff = NULL;
uint64_t length = 0;
plist_get_data_val(_node, &buff, &length);
- std::vector<uint8_t> ret(buff, buff + length);
+ std::vector<char> ret(buff, buff + length);
delete buff;
return ret;
}