[libcxx] r293450 - experimental: inline single use of a typedef

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 29 16:15:50 PST 2017


Author: compnerd
Date: Sun Jan 29 18:15:50 2017
New Revision: 293450

URL: http://llvm.org/viewvc/llvm-project?rev=293450&view=rev
Log:
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.

Modified:
    libcxx/trunk/src/experimental/filesystem/directory_iterator.cpp

Modified: libcxx/trunk/src/experimental/filesystem/directory_iterator.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/experimental/filesystem/directory_iterator.cpp?rev=293450&r1=293449&r2=293450&view=diff
==============================================================================
--- libcxx/trunk/src/experimental/filesystem/directory_iterator.cpp (original)
+++ libcxx/trunk/src/experimental/filesystem/directory_iterator.cpp Sun Jan 29 18:15:50 2017
@@ -24,10 +24,7 @@ inline bool set_or_throw(std::error_code
     return false;
 }
 
-typedef path::string_type string_type;
-
-
-inline string_type posix_readdir(DIR *dir_stream, error_code& ec) {
+inline path::string_type posix_readdir(DIR *dir_stream, error_code& ec) {
     struct dirent* dir_entry_ptr = nullptr;
     errno = 0; // zero errno in order to detect errors
     if ((dir_entry_ptr = ::readdir(dir_stream)) == nullptr) {




More information about the cfe-commits mailing list