Skip to content

Commit

Permalink
Mark base64.h encode and decode API's as inline (apache#13556)
Browse files Browse the repository at this point in the history
  • Loading branch information
f2013519 authored Dec 6, 2022
1 parent a1d4664 commit 8826c1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/contrib/torch/base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
namespace tvm {
namespace support {

size_t b64strlen(const std::string b64str) {
inline size_t b64strlen(const std::string b64str) {
ICHECK(b64str.size() % 4 == 0) << "invalid base64 encoding";
size_t length = b64str.size() / 4 * 3;
if (b64str[b64str.size() - 2] == '=') {
Expand All @@ -47,7 +47,7 @@ size_t b64strlen(const std::string b64str) {
return length;
}

void b64decode(const std::string b64str, u_char* ret) {
inline void b64decode(const std::string b64str, u_char* ret) {
size_t index = 0;
const auto length = b64str.size();
for (size_t i = 0; i < length; i += 4) {
Expand Down

0 comments on commit 8826c1c

Please sign in to comment.