Re: [PATCH RFC 4/5] Introduce scoped_mmapped_file

Tom Tromey
2018-05-12T03:53:34Z

>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

>> ... however, then I thought perhaps this question could be avoided by
>> just initializing m_fd directly, like:
>>
>> scoped_mmapped_file (const char *filename)
>> : m_fd (open (filename, 0, O_RDONLY))
>>
>> Then "reset" wouldn't be needed at all.

Simon> I can do that, but I am using reset() in the following patch anyway.

Oops, I didn't notice that. FWIW I think it's fine to have a reset
method.

Tom