aboutsummaryrefslogtreecommitdiff
path: root/src/account.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <ktirf@users.sf.net>2017-09-28 20:38:55 +0900
committerRichard van der Hoff <richard@matrix.org>2017-09-29 09:35:04 +0100
commit3c33180fe3ecd14d7d592546b82055485518f2a7 (patch)
treea9a1a225c2bd86784287717e7b342f622895f530 /src/account.cpp
parent0fd768e1b56157cb321d20eaffae59c3cbd4381f (diff)
Avoid C99 inside C++ code
This disrupts building at least with Visual Studio. Signed-off-by: Alexey Rusakov <ktirf@users.sf.net>
Diffstat (limited to 'src/account.cpp')
-rw-r--r--src/account.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/account.cpp b/src/account.cpp
index 248f3d1..05e8134 100644
--- a/src/account.cpp
+++ b/src/account.cpp
@@ -167,7 +167,7 @@ std::size_t olm::Account::get_one_time_keys_json_length(
}
is_empty = false;
length += 2; /* {" */
- length += olm::encode_base64_length(olm::pickle_length(key.id));
+ length += olm::encode_base64_length(_olm_pickle_uint32_length(key.id));
length += 3; /* ":" */
length += olm::encode_base64_length(sizeof(key.key.public_key));
length += 1; /* " */
@@ -198,8 +198,8 @@ std::size_t olm::Account::get_one_time_keys_json(
}
*(pos++) = sep;
*(pos++) = '\"';
- std::uint8_t key_id[olm::pickle_length(key.id)];
- olm::pickle(key_id, key.id);
+ std::uint8_t key_id[_olm_pickle_uint32_length(key.id)];
+ _olm_pickle_uint32(key_id, key.id);
pos = olm::encode_base64(key_id, sizeof(key_id), pos);
*(pos++) = '\"'; *(pos++) = ':'; *(pos++) = '\"';
pos = olm::encode_base64(