From f87177d34d54f9ff4bb41dc05946821d07af64eb Mon Sep 17 00:00:00 2001 From: sh0f <30991096+sh0f@users.noreply.github.com> Date: Wed, 1 Jan 2020 19:58:32 +0800 Subject: [PATCH] base64: fix warnings --- vlib/encoding/base64/base64.v | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vlib/encoding/base64/base64.v b/vlib/encoding/base64/base64.v index 08208b3a1e..72f7fb2740 100644 --- a/vlib/encoding/base64/base64.v +++ b/vlib/encoding/base64/base64.v @@ -128,9 +128,9 @@ pub fn encode_in_buffer(data &string, buffer byteptr) int { mut b := &byte(0) mut etable := &byte(0) unsafe{ - d = &byte(data.str) - b = &byte(buffer) - etable = &byte(EncodingTable.str) + d = data.str + b = buffer + etable = EncodingTable.str } for i < input_length { @@ -151,7 +151,7 @@ pub fn encode_in_buffer(data &string, buffer byteptr) int { i++ } - triple := ((int(octet_a) << 0x10) + (int(octet_b) << 0x08) + int(octet_c)) + triple := ((octet_a << 0x10) + (octet_b << 0x08) + octet_c) b[j] = etable[ (triple >> 3 * 6) & 63 ] // 63 is 0x3F b[j+1] = etable[ (triple >> 2 * 6) & 63 ]