@@ -588,7 +588,7 @@ namespace IGFD
588588#endif // USE_STD_FILESYSTEM
589589 }
590590
591- return bExists; // this is not a directory!
591+ return bExists; // this is not a directory!
592592 }
593593
594594 bool IGFD::Utils::IsDirectoryExist (const std::string& name)
@@ -629,7 +629,7 @@ namespace IGFD
629629#endif // USE_STD_FILESYSTEM
630630 }
631631
632- return bExists; // this is not a directory!
632+ return bExists; // this is not a directory!
633633 }
634634
635635 bool IGFD::Utils::CreateDirectoryIfNotExist (const std::string& name)
@@ -900,17 +900,15 @@ namespace IGFD
900900 // // FILTER MANAGER /////////////////////////////////////////////////////////////////
901901 // ///////////////////////////////////////////////////////////////////////////////////
902902
903- void IGFD::FilterManager::ParseFilters (const char * vFilters)
904- {
903+ void IGFD::FilterManager::ParseFilters (const char * vFilters) {
905904 prParsedFilters.clear ();
906905
907906 if (vFilters)
908907 puDLGFilters = vFilters; // file mode
909908 else
910909 puDLGFilters.clear (); // directory mode
911910
912- if (!puDLGFilters.empty ())
913- {
911+ if (!puDLGFilters.empty ()) {
914912 // ".*,.cpp,.h,.hpp" => simple filters
915913 // "Source files{.cpp,.h,.hpp},Image files{.png,.gif,.jpg,.jpeg},.md" => collection filters
916914 // "([.][0-9]{3}),.cpp,.h,.hpp" => simple filters with regex
@@ -920,22 +918,19 @@ namespace IGFD
920918
921919 size_t nan = std::string::npos;
922920 size_t p = 0 , lp = 0 ;
923- while ((p = puDLGFilters.find_first_of (" {," , p)) != nan)
924- {
921+ while ((p = puDLGFilters.find_first_of (" {," , p)) != nan) {
925922 FilterInfos infos;
926923
927- if (puDLGFilters[p] == ' {' ) // {
924+ if (puDLGFilters[p] == ' {' ) // {
928925 {
929926 infos.filter = puDLGFilters.substr (lp, p - lp);
930927 infos.filter_optimized = Utils::LowerCaseString (infos.filter );
931928 p++;
932929 lp = puDLGFilters.find (' }' , p);
933- if (lp != nan)
934- {
930+ if (lp != nan) {
935931 std::string fs = puDLGFilters.substr (p, lp - p);
936932 auto arr = IGFD::Utils::SplitStringToVector (fs, ' ,' , false );
937- for (auto a : arr)
938- {
933+ for (auto a : arr) {
939934 infos.collectionfilters .emplace (a);
940935 infos.collectionfilters_optimized .emplace (Utils::LowerCaseString (a));
941936
@@ -948,8 +943,7 @@ namespace IGFD
948943 }
949944 }
950945 p = lp + 1 ;
951- }
952- else // ,
946+ } else // ,
953947 {
954948 infos.filter = puDLGFilters.substr (lp, p - lp);
955949 infos.filter_optimized = Utils::LowerCaseString (infos.filter );
@@ -964,8 +958,7 @@ namespace IGFD
964958 p++;
965959 }
966960
967- if (!currentFilterFound && prSelectedFilter.filter == infos.filter )
968- {
961+ if (!currentFilterFound && prSelectedFilter.filter == infos.filter ) {
969962 currentFilterFound = true ;
970963 prSelectedFilter = infos;
971964 }
@@ -976,8 +969,7 @@ namespace IGFD
976969 }
977970
978971 std::string token = puDLGFilters.substr (lp);
979- if (!token.empty ())
980- {
972+ if (!token.empty ()) {
981973 FilterInfos infos;
982974 infos.filter = std::move (token);
983975 prParsedFilters.emplace_back (infos);
0 commit comments