From a44354498690f41d3174b48e0cab75499c70ed19 Mon Sep 17 00:00:00 2001 From: Matias Date: Thu, 9 May 2019 15:28:00 +0200 Subject: [PATCH] Replaced binary literals with hex literals (since binary literals was introduced in C++14) --- code/FBXUtil.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/FBXUtil.cpp b/code/FBXUtil.cpp index 068683f7d..557d0d843 100644 --- a/code/FBXUtil.cpp +++ b/code/FBXUtil.cpp @@ -170,10 +170,10 @@ char EncodeBase64(char byte) * @param string_pos Position in out_string.*/ void EncodeByteBlock(const char* bytes, std::string& out_string, size_t string_pos) { - char b0 = (bytes[0] & 0b11111100) >> 2; - char b1 = (bytes[0] & 0b00000011) << 4 | ((bytes[1] & 0b11110000) >> 4); - char b2 = (bytes[1] & 0b00001111) << 2 | ((bytes[2] & 0b11000000) >> 6); - char b3 = (bytes[2] & 0b00111111); + char b0 = (bytes[0] & 0xFC) >> 2; + char b1 = (bytes[0] & 0x03) << 4 | ((bytes[1] & 0xF0) >> 4); + char b2 = (bytes[1] & 0x0F) << 2 | ((bytes[2] & 0xC0) >> 6); + char b3 = (bytes[2] & 0x3F); out_string[string_pos + 0] = EncodeBase64(b0); out_string[string_pos + 1] = EncodeBase64(b1);