aboutsummaryrefslogtreecommitdiff
path: root/include/olm/base64.hh
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-04-26 18:10:13 +0100
committerRichard van der Hoff <richard@matrix.org>2016-04-26 18:10:13 +0100
commit11dbf2aab3e9a65148a40ac6b5b1124929344c1a (patch)
tree6550798794f5df40bcd86cd151efcc2027b0cca3 /include/olm/base64.hh
parent9b010290a49243e5867dd9d4c93784a345fb2637 (diff)
Fix a bunch of compiler warnings, and turn on warnings.
Diffstat (limited to 'include/olm/base64.hh')
-rw-r--r--include/olm/base64.hh6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/olm/base64.hh b/include/olm/base64.hh
index da4641d..dfdccd0 100644
--- a/include/olm/base64.hh
+++ b/include/olm/base64.hh
@@ -23,11 +23,9 @@ namespace olm {
/**
* The number of bytes of unpadded base64 needed to encode a length of input.
*/
-static std::size_t encode_base64_length(
+std::size_t encode_base64_length(
std::size_t input_length
-) {
- return 4 * ((input_length + 2) / 3) + (input_length + 2) % 3 - 2;
-}
+);
/**
* Encode the raw input as unpadded base64.