Skip to content

Commit

Permalink
Merge pull request #13 from vogma/fix_compile_errors
Browse files Browse the repository at this point in the history
fixed missing cstdint includes + fixed narrowing conversion error on RISC-V platform
  • Loading branch information
gaspardpetit authored Oct 15, 2024
2 parents f479bfd + 729cb3b commit 143c4a2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/A.Hristov/ahristov.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <string>
#include <cstdint>
/**
* Given a string, this function will encode it in 64b (with padding)
*/
Expand All @@ -7,4 +8,4 @@ std::string encodeBase64(const std::string& binaryText);
/**
* Given a 64b padding-encoded string, this function will decode it.
*/
std::string decodeBase64(const std::string& base64Text);
std::string decodeBase64(const std::string& base64Text);
1 change: 1 addition & 0 deletions src/ElegantDice/ElegantDice.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <vector>
#include <string>
#include <cstdint>

void base64_encode(std::string & out, const std::vector<std::uint8_t>& buf);
void base64_encode(std::string & out, const std::uint8_t* buf, size_t bufLen);
Expand Down
1 change: 1 addition & 0 deletions src/omnifarious/omnifarious.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <string>
#include <cstdint>
::std::string base64_encode(const ::std::string &bindata);
::std::string base64_encode(const char *bytes, size_t length);
::std::string base64_decode(const ::std::string &ascdata);
3 changes: 2 additions & 1 deletion src/tomykaria/tomykaria.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
//https://gist.github.com/tomykaira/f0fd86b6c73063283afe550bc5d77594
#include <string>
#include <cstdint>

namespace macaron {

Expand Down Expand Up @@ -126,4 +127,4 @@ class Base64 {
}
};

} // namespace macaron
} // namespace macaron
2 changes: 1 addition & 1 deletion src/user152949/user152949.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CBase64
static inline const char encodeCharacterTable[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

/** Static Base64 character decoding lookup table */
static inline const char decodeCharacterTable[256] = {
static inline const signed char decodeCharacterTable[256] = {
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21
,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1,
Expand Down

0 comments on commit 143c4a2

Please sign in to comment.