libragephoto: introduce C library port

CMakeLists.txt: fixes for MSVC and C library support
RagePhoto: non C++11 support
RagePhotoC: clarify C instance support in comment
RagePhotoTypedefs: add typedefs for C library
This commit is contained in:
Syping 2023-06-06 19:39:22 +02:00
parent af3580dff4
commit 3046cbd077
5 changed files with 1261 additions and 16 deletions

View file

@ -970,7 +970,11 @@ bool RagePhoto::saveFile(const std::string &filename, uint32_t photoFormat)
m_data->error = Error::Uninitialised; // 0
return false;
}
#if (RAGEPHOTO_CXX_STD >= 11) && (__cplusplus >= 201103L)
ofs << sdata;
#else
ofs.write(sdata.data(), sdata.size());
#endif
ok = ofs.good();
ofs.close();
return ok;