Skip to content

Commit 3d91e54

Browse files
committed
-
1 parent 5c748a2 commit 3d91e54

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

ImGuiFileDialog.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ bool IGFD::Utils::ReplaceString(std::string& str, const ::std::string& oldStr, c
876876
return false;
877877
}
878878

879-
std::vector<std::string> IGFD::Utils::SplitStringToVector(const std::string& vText, const std::string& vDelimiterPattern, const bool& vPushEmpty) {
879+
std::vector<std::string> IGFD::Utils::SplitStringToVector(const std::string& vText, const std::string& vDelimiterPattern, const bool vPushEmpty) {
880880
std::vector<std::string> arr;
881881
if (!vText.empty()) {
882882
size_t start = 0;
@@ -897,7 +897,7 @@ std::vector<std::string> IGFD::Utils::SplitStringToVector(const std::string& vTe
897897
return arr;
898898
}
899899

900-
std::vector<std::string> IGFD::Utils::SplitStringToVector(const std::string& vText, const char& vDelimiter, const bool& vPushEmpty) {
900+
std::vector<std::string> IGFD::Utils::SplitStringToVector(const std::string& vText, const char& vDelimiter, const bool vPushEmpty) {
901901
std::vector<std::string> arr;
902902
if (!vText.empty()) {
903903
size_t start = 0;
@@ -1145,12 +1145,12 @@ void IGFD::FilterInfos::setCollectionTitle(const std::string& vTitle) {
11451145
title = vTitle;
11461146
}
11471147

1148-
void IGFD::FilterInfos::addFilter(const std::string& vFilter, const bool& vIsRegex) {
1148+
void IGFD::FilterInfos::addFilter(const std::string& vFilter, const bool vIsRegex) {
11491149
setCollectionTitle(vFilter);
11501150
addCollectionFilter(vFilter, vIsRegex);
11511151
}
11521152

1153-
void IGFD::FilterInfos::addCollectionFilter(const std::string& vFilter, const bool& vIsRegex) {
1153+
void IGFD::FilterInfos::addCollectionFilter(const std::string& vFilter, const bool vIsRegex) {
11541154
if (!vIsRegex) {
11551155
auto _count_dots = Utils::GetCharCountInString(vFilter, '.');
11561156
if (_count_dots > IGFD::FilterInfos::count_dots) {
@@ -1669,12 +1669,12 @@ void IGFD::FilterManager::SetDefaultFilterIfNotDefined() {
16691669
}
16701670

16711671
IGFD::FileType::FileType() = default;
1672-
IGFD::FileType::FileType(const ContentType& vContentType, const bool& vIsSymlink) : m_Content(vContentType), m_Symlink(vIsSymlink) {
1672+
IGFD::FileType::FileType(const ContentType& vContentType, const bool vIsSymlink) : m_Content(vContentType), m_Symlink(vIsSymlink) {
16731673
}
16741674
void IGFD::FileType::SetContent(const ContentType& vContentType) {
16751675
m_Content = vContentType;
16761676
}
1677-
void IGFD::FileType::SetSymLink(const bool& vIsSymlink) {
1677+
void IGFD::FileType::SetSymLink(const bool vIsSymlink) {
16781678
m_Symlink = vIsSymlink;
16791679
}
16801680
bool IGFD::FileType::isValid() const {
@@ -1721,7 +1721,7 @@ bool IGFD::FileInfos::SearchForTag(const std::string& vTag) const {
17211721
return true;
17221722
}
17231723

1724-
bool IGFD::FileInfos::SearchForExt(const std::string& vExt, const bool& vIsCaseInsensitive, const size_t& vMaxLevel) const {
1724+
bool IGFD::FileInfos::SearchForExt(const std::string& vExt, const bool vIsCaseInsensitive, const size_t& vMaxLevel) const {
17251725
if (!vExt.empty()) {
17261726
const auto& ext_to_check = vIsCaseInsensitive ? Utils::LowerCaseString(vExt) : vExt;
17271727
const auto& ext_levels = vIsCaseInsensitive ? fileExtLevels_optimized : fileExtLevels;
@@ -1738,7 +1738,7 @@ bool IGFD::FileInfos::SearchForExt(const std::string& vExt, const bool& vIsCaseI
17381738
return false;
17391739
}
17401740

1741-
bool IGFD::FileInfos::SearchForExts(const std::string& vComaSepExts, const bool& vIsCaseInsensitive, const size_t& vMaxLevel) const {
1741+
bool IGFD::FileInfos::SearchForExts(const std::string& vComaSepExts, const bool vIsCaseInsensitive, const size_t& vMaxLevel) const {
17421742
if (!vComaSepExts.empty()) {
17431743
const auto& arr = Utils::SplitStringToVector(vComaSepExts, ',', false);
17441744
for (const auto& a : arr) {
@@ -3214,7 +3214,7 @@ bool IGFD::PlacesFeature::m_DrawPlacesPane(FileDialogInternal& vFileDialogIntern
32143214
return res;
32153215
}
32163216

3217-
std::string IGFD::PlacesFeature::SerializePlaces(const bool& /*vForceSerialisationForAll*/) {
3217+
std::string IGFD::PlacesFeature::SerializePlaces(const bool /*vForceSerialisationForAll*/) {
32183218
std::string res;
32193219
size_t idx = 0;
32203220
for (const auto& group : m_Groups) {
@@ -3251,7 +3251,7 @@ void IGFD::PlacesFeature::DeserializePlaces(const std::string& vPlaces) {
32513251
}
32523252
}
32533253

3254-
bool IGFD::PlacesFeature::AddPlacesGroup(const std::string& vGroupName, const size_t& vDisplayOrder, const bool& vCanBeEdited, const bool& vOpenedByDefault) {
3254+
bool IGFD::PlacesFeature::AddPlacesGroup(const std::string& vGroupName, const size_t& vDisplayOrder, const bool vCanBeEdited, const bool vOpenedByDefault) {
32553255
if (vGroupName.empty()) {
32563256
return false;
32573257
}
@@ -3285,7 +3285,7 @@ IGFD::PlacesFeature::GroupStruct* IGFD::PlacesFeature::GetPlacesGroupPtr(const s
32853285
return nullptr;
32863286
}
32873287

3288-
bool IGFD::PlacesFeature::GroupStruct::AddPlace(const std::string& vPlaceName, const std::string& vPlacePath, const bool& vCanBeSaved, const FileStyle& vStyle) {
3288+
bool IGFD::PlacesFeature::GroupStruct::AddPlace(const std::string& vPlaceName, const std::string& vPlacePath, const bool vCanBeSaved, const FileStyle& vStyle) {
32893289
if (vPlaceName.empty() || vPlacePath.empty()) {
32903290
return false;
32913291
}
@@ -4198,7 +4198,7 @@ void IGFD::FileDialog::m_BeginFileColorIconStyle(std::shared_ptr<FileInfos> vFil
41984198
if (*vOutFont) ImGui::PushFont(*vOutFont);
41994199
}
42004200

4201-
void IGFD::FileDialog::m_EndFileColorIconStyle(const bool& vShowColor, ImFont* vFont) {
4201+
void IGFD::FileDialog::m_EndFileColorIconStyle(const bool vShowColor, ImFont* vFont) {
42024202
if (vFont) ImGui::PopFont();
42034203
if (vShowColor) ImGui::PopStyleColor();
42044204
}

ImGuiFileDialog.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ class IGFD_API Utils {
329329
static void SetBuffer(char* vBuffer, size_t vBufferLen, const std::string& vStr);
330330
static std::string UTF8Encode(const std::wstring& wstr);
331331
static std::wstring UTF8Decode(const std::string& str);
332-
static std::vector<std::string> SplitStringToVector(const std::string& vText, const std::string& vDelimiterPattern, const bool& vPushEmpty);
333-
static std::vector<std::string> SplitStringToVector(const std::string& vText, const char& vDelimiter, const bool& vPushEmpty);
332+
static std::vector<std::string> SplitStringToVector(const std::string& vText, const std::string& vDelimiterPattern, const bool vPushEmpty);
333+
static std::vector<std::string> SplitStringToVector(const std::string& vText, const char& vDelimiter, const bool vPushEmpty);
334334
static std::string LowerCaseString(const std::string& vString); // turn all text in lower case for search facilitie
335335
static size_t GetCharCountInString(const std::string& vString, const char& vChar);
336336
static size_t GetLastCharPosWithMinCharCount(const std::string& vString, const char& vChar, const size_t& vMinCharCount);
@@ -397,8 +397,8 @@ class IGFD_API FilterInfos {
397397
bool regexExist(const std::string& vFilter) const; // is regex filter exist
398398
bool exist(const FileInfos& vFileInfos, bool vIsCaseInsensitive) const; // is filter exist
399399
void setCollectionTitle(const std::string& vTitle); // set the collection title
400-
void addFilter(const std::string& vFilter, const bool& vIsRegex); // add a filter
401-
void addCollectionFilter(const std::string& vFilter, const bool& vIsRegex); // add a filter in collection
400+
void addFilter(const std::string& vFilter, const bool vIsRegex); // add a filter
401+
void addCollectionFilter(const std::string& vFilter, const bool vIsRegex); // add a filter in collection
402402
static std::string transformAsteriskBasedFilterToRegex(const std::string& vFilter); // will transform a filter who contain * to a regex
403403
};
404404

@@ -455,10 +455,10 @@ class IGFD_API FileType {
455455

456456
public:
457457
FileType();
458-
FileType(const ContentType& vContentType, const bool& vIsSymlink);
458+
FileType(const ContentType& vContentType, const bool vIsSymlink);
459459

460460
void SetContent(const ContentType& vContentType);
461-
void SetSymLink(const bool& vIsSymlink);
461+
void SetSymLink(const bool vIsSymlink);
462462

463463
bool isValid() const;
464464
bool isDir() const;
@@ -504,9 +504,9 @@ class IGFD_API FileInfos {
504504

505505
public:
506506
bool SearchForTag(const std::string& vTag) const; // will search a tag in fileNameExt and fileNameExt_optimized
507-
bool SearchForExt(const std::string& vExt, const bool& vIsCaseInsensitive,
507+
bool SearchForExt(const std::string& vExt, const bool vIsCaseInsensitive,
508508
const size_t& vMaxLevel = EXT_MAX_LEVEL) const; // will check the fileExtLevels levels for vExt, until vMaxLevel
509-
bool SearchForExts(const std::string& vComaSepExts, const bool& vIsCaseInsensitive,
509+
bool SearchForExts(const std::string& vComaSepExts, const bool vIsCaseInsensitive,
510510
const size_t& vMaxLevel = EXT_MAX_LEVEL) const; // will check the fileExtLevels levels for vExts (ext are coma separated), until vMaxLevel
511511
bool FinalizeFileTypeParsing(const size_t& vMaxDotToExtract); // finalize the parsing the file (only a file or link to file. no dir)
512512
};
@@ -818,7 +818,7 @@ class IGFD_API PlacesFeature {
818818
bool AddPlace( // add a place by code
819819
const std::string& vPlaceName, // place name
820820
const std::string& vPlacePath, // place path
821-
const bool& vCanBeSaved, // prevent serialization
821+
const bool vCanBeSaved, // prevent serialization
822822
const FileStyle& vStyle = {}); // style
823823
void AddPlaceSeparator(const float& vThickness = 1.0f);
824824
bool RemovePlace( // remove a place by code, return true if succeed
@@ -840,14 +840,14 @@ class IGFD_API PlacesFeature {
840840

841841
public:
842842
std::string SerializePlaces( // serialize place : return place buffer to save in a file
843-
const bool& vForceSerialisationForAll = true); // for avoid serialization of places with flag 'canBeSaved to false'
843+
const bool vForceSerialisationForAll = true); // for avoid serialization of places with flag 'canBeSaved to false'
844844
void DeserializePlaces( // deserialize place : load place buffer to load in the dialog (saved from
845845
const std::string& vPlaces); // previous use with SerializePlaces()) place buffer to load
846846
bool AddPlacesGroup( // add a group
847847
const std::string& vGroupName, // the group name
848848
const size_t& vDisplayOrder, // the display roder of the group
849-
const bool& vCanBeEdited = false, // let the user add/remove place in the group
850-
const bool& vOpenedByDefault = true); // hte group is opened by default
849+
const bool vCanBeEdited = false, // let the user add/remove place in the group
850+
const bool vOpenedByDefault = true); // hte group is opened by default
851851
bool RemovePlacesGroup(const std::string& vGroupName); // remove the group
852852
GroupStruct* GetPlacesGroupPtr(const std::string& vGroupName); // get the group, if not existed, will be created
853853
#endif // USE_PLACES_FEATURE
@@ -1008,7 +1008,7 @@ class IGFD_API FileDialog : public PlacesFeature, public KeyExplorerFeature, pub
10081008
// - m_DrawThumbnailsGridView
10091009
void m_BeginFileColorIconStyle(std::shared_ptr<FileInfos> vFileInfos, bool& vOutShowColor, std::string& vOutStr,
10101010
ImFont** vOutFont); // begin style apply of filter with color an icon if any
1011-
void m_EndFileColorIconStyle(const bool& vShowColor, ImFont* vFont); // end style apply of filter
1011+
void m_EndFileColorIconStyle(const bool vShowColor, ImFont* vFont); // end style apply of filter
10121012

10131013
void m_DisplayFileInfosTooltip(const int32_t& vRowIdx, const int32_t& vColumnIdx, std::shared_ptr<FileInfos> vFileInfos);
10141014
};

0 commit comments

Comments
 (0)