MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / toByteArray

Function toByteArray

source/MRViewer/MRFileDialogPortal.cpp:191–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191std::vector<std::byte> toByteArray( const std::filesystem::path& path )
192{
193 const auto str = MR::utf8string( path );
194 std::vector<std::byte> results;
195 results.reserve( str.size() + 1 );
196 for ( auto ch : str )
197 results.emplace_back( (std::byte)ch );
198 results.emplace_back( (std::byte)'\0' );
199 return results;
200}
201
202void initArgs( DBusMessage* msg, const char* parentWindow, const char* title, const FileChooserOptions& options )
203{

Callers 1

initArgsFunction · 0.85

Calls 3

utf8stringFunction · 0.85
reserveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected