mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-07-06 07:15:12 +08:00
Merge pull request #88 from Selmar/forward_declare_dataUri_utils
forward declare DataURI helpers
This commit is contained in:
commit
fcdfc71ba6
@ -189,6 +189,11 @@ static inline int32_t GetTypeSizeInBytes(uint32_t ty) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsDataURI(const std::string &in);
|
||||||
|
bool DecodeDataURI(std::vector<unsigned char> *out,
|
||||||
|
std::string &mime_type, const std::string &in,
|
||||||
|
size_t reqBytes, bool checkSize);
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
// Suppress warning for : static Value null_value
|
// Suppress warning for : static Value null_value
|
||||||
@ -1608,7 +1613,7 @@ static void UpdateImageObject(Image &image, std::string &baseDir, int index,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool IsDataURI(const std::string &in) {
|
bool IsDataURI(const std::string &in) {
|
||||||
std::string header = "data:application/octet-stream;base64,";
|
std::string header = "data:application/octet-stream;base64,";
|
||||||
if (in.find(header) == 0) {
|
if (in.find(header) == 0) {
|
||||||
return true;
|
return true;
|
||||||
@ -1647,7 +1652,7 @@ static bool IsDataURI(const std::string &in) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool DecodeDataURI(std::vector<unsigned char> *out,
|
bool DecodeDataURI(std::vector<unsigned char> *out,
|
||||||
std::string &mime_type, const std::string &in,
|
std::string &mime_type, const std::string &in,
|
||||||
size_t reqBytes, bool checkSize) {
|
size_t reqBytes, bool checkSize) {
|
||||||
std::string header = "data:application/octet-stream;base64,";
|
std::string header = "data:application/octet-stream;base64,";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user