mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 12:02:36 +08:00
experimental: inline single use of a typedef
The typedef is not particularly long, and used in exactly one location. Just spell it out at the site. NFC. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@293450 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -24,10 +24,7 @@ inline bool set_or_throw(std::error_code& my_ec,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef path::string_type string_type;
|
inline path::string_type posix_readdir(DIR *dir_stream, error_code& ec) {
|
||||||
|
|
||||||
|
|
||||||
inline string_type posix_readdir(DIR *dir_stream, error_code& ec) {
|
|
||||||
struct dirent* dir_entry_ptr = nullptr;
|
struct dirent* dir_entry_ptr = nullptr;
|
||||||
errno = 0; // zero errno in order to detect errors
|
errno = 0; // zero errno in order to detect errors
|
||||||
if ((dir_entry_ptr = ::readdir(dir_stream)) == nullptr) {
|
if ((dir_entry_ptr = ::readdir(dir_stream)) == nullptr) {
|
||||||
|
|||||||
Reference in New Issue
Block a user