Ticket #11288: operations.cpp.patch

File operations.cpp.patch, 1.4 KB (added by anonymous, 7 years ago)

A patch to avoid redundant string allocations

  • libs/filesystem/src/operations.cpp

    old new  
    245245
    246246  const error_code ok;
    247247
    248   bool error(bool was_error, error_code* ec, const string& message)
     248  bool error(bool was_error, error_code* ec, const char* message)
    249249  {
    250250    if (!was_error)
    251251    {
     
    262262    return was_error;
    263263  }
    264264
    265   bool error(bool was_error, const path& p, error_code* ec, const string& message)
     265  bool error(bool was_error, const path& p, error_code* ec, const char* message)
    266266  {
    267267    if (!was_error)
    268268    {
     
    280280  }
    281281
    282282  bool error(bool was_error, const path& p1, const path& p2, error_code* ec,
    283     const string& message)
     283    const char* message)
    284284  {
    285285    if (!was_error)
    286286    {
     
    298298  }
    299299
    300300  bool error(bool was_error, const error_code& result,
    301     const path& p, error_code* ec, const string& message)
     301    const path& p, error_code* ec, const char* message)
    302302    //  Overwrites ec if there has already been an error
    303303  {
    304304    if (!was_error)
     
    316316  }
    317317
    318318  bool error(bool was_error, const error_code& result,
    319     const path& p1, const path& p2, error_code* ec, const string& message)
     319    const path& p1, const path& p2, error_code* ec, const char* message)
    320320    //  Overwrites ec if there has already been an error
    321321  {
    322322    if (!was_error)