libragephoto: add opt-in C++17 support
- RagePhoto(A): add jpeg_view() function - CMakeLists.txt: move C++17 and WebAssembly stuff inside include files
This commit is contained in:
parent
4ca8ac9297
commit
3c433ca072
8 changed files with 102 additions and 35 deletions
|
@ -602,6 +602,16 @@ const std::string RagePhoto::jpeg() const
|
|||
return std::string();
|
||||
}
|
||||
|
||||
#if (RAGEPHOTO_CXX_STD >= 17) && (__cplusplus >= 201703L)
|
||||
const std::string_view RagePhoto::jpeg_view() const
|
||||
{
|
||||
if (m_data->jpeg)
|
||||
return std::string_view(m_data->jpeg, m_data->jpegSize);
|
||||
else
|
||||
return std::string_view();
|
||||
}
|
||||
#endif
|
||||
|
||||
const char* RagePhoto::jpegData() const
|
||||
{
|
||||
return m_data->jpeg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue