This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Avoid redundant calls to filesystem::status_known


Useing exists(file_status) inside exists(const path&, error_code&)
means we call status_known twice, because exists(file_status) calls it
internally. By inlining the exists(file_status) logic into the outer
function we avoid the redundant call.

	* include/bits/fs_ops.h (exists(const path&, error_code&))): Only
	check status_known once.
	* include/experimental/bits/fs_ops.h: Likewise.

Tested powerpc64le-linux, committed to trunk.

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]