-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: falkTX <[email protected]>
- Loading branch information
Showing
3 changed files
with
99 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
|
||
#include <vector> | ||
|
||
// ----------------------------------------------------------------------- | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// base64 stuff, based on http://www.adp-gmbh.ch/cpp/common/base64.html | ||
|
||
/* | ||
|
@@ -48,7 +48,7 @@ | |
René Nyffenegger [email protected] | ||
*/ | ||
|
||
// ----------------------------------------------------------------------- | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// Helpers | ||
|
||
#ifndef DOXYGEN | ||
|
@@ -77,82 +77,13 @@ uint8_t findBase64CharIndex(const char c) | |
static constexpr inline | ||
bool isBase64Char(const char c) | ||
{ | ||
switch (c) | ||
{ | ||
case 'A': | ||
case 'B': | ||
case 'C': | ||
case 'D': | ||
case 'E': | ||
case 'F': | ||
case 'G': | ||
case 'H': | ||
case 'I': | ||
case 'J': | ||
case 'K': | ||
case 'L': | ||
case 'M': | ||
case 'N': | ||
case 'O': | ||
case 'P': | ||
case 'Q': | ||
case 'R': | ||
case 'S': | ||
case 'T': | ||
case 'U': | ||
case 'V': | ||
case 'W': | ||
case 'X': | ||
case 'Y': | ||
case 'Z': | ||
case 'a': | ||
case 'b': | ||
case 'c': | ||
case 'd': | ||
case 'e': | ||
case 'f': | ||
case 'g': | ||
case 'h': | ||
case 'i': | ||
case 'j': | ||
case 'k': | ||
case 'l': | ||
case 'm': | ||
case 'n': | ||
case 'o': | ||
case 'p': | ||
case 'q': | ||
case 'r': | ||
case 's': | ||
case 't': | ||
case 'u': | ||
case 'v': | ||
case 'w': | ||
case 'x': | ||
case 'y': | ||
case 'z': | ||
case '0': | ||
case '1': | ||
case '2': | ||
case '3': | ||
case '4': | ||
case '5': | ||
case '6': | ||
case '7': | ||
case '8': | ||
case '9': | ||
case '+': | ||
case '/': | ||
return true; | ||
default: | ||
return false; | ||
} | ||
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '+' || c == '/'; | ||
} | ||
|
||
} // namespace DistrhoBase64Helpers | ||
#endif | ||
|
||
// ----------------------------------------------------------------------- | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
static inline | ||
std::vector<uint8_t> d_getChunkFromBase64String(const char* const base64string) | ||
|
@@ -213,6 +144,6 @@ std::vector<uint8_t> d_getChunkFromBase64String(const char* const base64string) | |
return ret; | ||
} | ||
|
||
// ----------------------------------------------------------------------- | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
#endif // DISTRHO_BASE64_HPP_INCLUDED |
Oops, something went wrong.