-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63560/
-----------------------------------------------------------

Review request for mesos, Benjamin Hindman and Benjamin Mahler.


Repository: mesos


Description
-------

Found by `support/mesos-tidy.sh`:

```
3rdparty/libprocess/src/http.cpp:675:10: warning: redundant call to
'data' [readability-redundant-string-cstr]
  body = out.str().data();
         ^~~~~~~~~~~~~~~~~
         out.str()
```

Here, the `out.str()` produces a temporary string. `body = out.str()`
would simply move-assign `body` with the temporary string, but
`body = out.str().data()` pulls a `const char*` out of the temporary
string which forces us to construct yet another temporary string.


Diffs
-----

  3rdparty/libprocess/src/http.cpp a4d71fb6c345d3c7a7611004830f6c2c0fbf6046 


Diff: https://reviews.apache.org/r/63560/diff/1/


Testing
-------

`make check`


Thanks,

Michael Park

Reply via email to