NatronGitHub / openfx-arena

Extra OpenFX plugins for Natron
Other
41 stars 11 forks source link

ReadPDF build error #7

Closed devernay closed 4 years ago

devernay commented 4 years ago

It should use .reset():

            globalParams.reset(new GlobalParams(popplerData.c_str()));

Error:

../Extra/ReadPDF.cpp:138:26: error: no viable overloaded '='
            globalParams = new GlobalParams(popplerData.c_str());
            ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/libexec/llvm-9.0/bin/../include/c++/v1/memory:2396:28: note: candidate function (the implicit copy assignment operator)
      not viable: no known conversion from 'GlobalParams *' to 'const std::__1::unique_ptr<GlobalParams,
      std::__1::default_delete<GlobalParams> >' for 1st argument
class _LIBCPP_TEMPLATE_VIS unique_ptr {
                           ^
/opt/local/libexec/llvm-9.0/bin/../include/c++/v1/memory:2511:15: note: candidate function not viable: no known conversion from
      'GlobalParams *' to 'std::__1::unique_ptr<GlobalParams, std::__1::default_delete<GlobalParams> >' for 1st argument
  unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
              ^
/opt/local/libexec/llvm-9.0/bin/../include/c++/v1/memory:2550:15: note: candidate function not viable: no known conversion from
      'GlobalParams *' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
  unique_ptr& operator=(nullptr_t) _NOEXCEPT {
              ^
/opt/local/libexec/llvm-9.0/bin/../include/c++/v1/memory:2522:15: note: candidate template ignored: could not match
      'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'GlobalParams *'
  unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
              ^
/opt/local/libexec/llvm-9.0/bin/../include/c++/v1/memory:2534:7: note: candidate template ignored: could not match
      'auto_ptr<type-parameter-0-0>' against 'GlobalParams *'
      operator=(auto_ptr<_Up> __p) {
      ^