> On Nov. 18, 2014, 9:14 a.m., Dominic Hamon wrote: > > src/common/http.cpp, line 133 > > <https://reviews.apache.org/r/28155/diff/1/?file=766843#file766843line133> > > > > or: > > > > object.values["parameters"] = (task.has_parameters() ? > > task.parameters() : ""); > > Niklas Nielsen wrote: > Will that work when return value of task.parameters() and "" are > different types? > > Dominic Hamon wrote: > as long as they're convertable to each other, yes as it's an rvalue. I > don't know if a string is implicitly convertable to a parameter though. My > guess is no, so maybe instead the "" should be an empty array?
I can take it for a spin, but is we have to do what you suggest; my bet is that it won't be more readable compared to the explicit if/else - Niklas ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28155/#review61939 ----------------------------------------------------------- On Nov. 17, 2014, 8:14 p.m., Niklas Nielsen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28155/ > ----------------------------------------------------------- > > (Updated Nov. 17, 2014, 8:14 p.m.) > > > Review request for mesos and Timothy Chen. > > > Bugs: MESOS-2120 > https://issues.apache.org/jira/browse/MESOS-2120 > > > Repository: mesos-git > > > Description > ------- > > See description. > > > Diffs > ----- > > src/common/http.hpp afce7fea334c7bfa57efc48c413bf906a2ebde32 > src/common/http.cpp 58050e9534045ec3e8b74dd0214b1b12d5ff8ea7 > > Diff: https://reviews.apache.org/r/28155/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Niklas Nielsen > >
