> On Oct. 23, 2015, 11:45 a.m., Joseph Wu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/mkdtemp.hpp, 
> > line 34
> > <https://reviews.apache.org/r/39559/diff/1/?file=1103501#file1103501line34>
> >
> >     `strlen()` might be better/more-readable.
> 
> Alex Clemmer wrote:
>     So, I could definitely be mistaken, but it looks like `strlen` would have 
> to be recomputed every time we call the function, right? And it looks like 
> this code is normally run at initialization time?
>     
>     If so it seems like this way has a clear benefit over the `strlen` 
> approach. What do you think? Maybe there is another way to make `strlen` an 
> init-time expression? (I already looked at `constexpr`.)
> 
> Alex Clemmer wrote:
>     Post script: this exchange actually convinced me that we should compute 
> the size of `alphabet` statically to! Let me know if you have a problem with 
> this given the constraints I mentioned. :)

After taking a second pass at your code, I'd say `strlen` isn't really more 
readable.  Dropping.


- Joseph


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


On Oct. 29, 2015, 10:53 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39559/
> -----------------------------------------------------------
> 
> (Updated Oct. 29, 2015, 10:53 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Windows: Implemented `os::mkdtemp`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> 67b142bbc2d80f40a1e893cc5813d58dd2aa8381 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 
> fc2df6831ae2cb1a91c7a8cc92965939576e575d 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/mkdtemp.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/mkdtemp.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/mkdtemp.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 
> e26df59d9b837e1f4a4b92577f0a3de4b9076cb4 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 
> edf17d5ad8efbc988e909bfb8ffa5a015ecdc89d 
> 
> Diff: https://reviews.apache.org/r/39559/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>

Reply via email to