PIP_DEBUG, PIVector sort and doc

This commit is contained in:
Andrey
2022-04-13 11:22:27 +03:00
parent 00830958df
commit e4e16764f3
11 changed files with 77 additions and 41 deletions

View File

@@ -303,8 +303,7 @@ public:
PIStringList toStringList() const {return _value.split("%|%");}
private:
typedef PIConfig::Entry * EntryPtr;
static int compare(const EntryPtr * f, const EntryPtr * s) {return (*f)->_line == (*s)->_line ? 0 : (*f)->_line < (*s)->_line ? -1 : 1;}
static bool compare(PIConfig::Entry * const & f, PIConfig::Entry * const & s) {return f->_line < s->_line;}
bool entryExists(const Entry * e, const PIString & name) const;
void buildLine() {_all = _tab + _full_name + " = " + _value + " #" + _type + " " + _comment;}
void clear() {_children.clear(); _name = _value = _type = _comment = _all = PIString(); _line = 0; _parent = 0;}

View File

@@ -237,8 +237,8 @@ bool PIDir::make(bool withParents) {
#ifdef WINDOWS
int sort_compare(const PIFile::FileInfo * v0, const PIFile::FileInfo * v1) {
return strcoll(v0->path.data(), v1->path.data());
bool sort_compare(const PIFile::FileInfo & v0, const PIFile::FileInfo & v1) {
return strcoll(v0.path.data(), v1.path.data()) < 0;
}
#endif