コード例 #1
0
ファイル: fs.cpp プロジェクト: RobLoach/scummvm
bool FSNode::operator<(const FSNode& node) const {
    // Directories come before files, i.e., are "lower".
    if (isDirectory() != node.isDirectory())
        return isDirectory();

    // If both nodes are of the same type (two files or two dirs),
    // then sort by name, ignoring case.
    return getDisplayName().compareToIgnoreCase(node.getDisplayName()) < 0;
}
コード例 #2
0
ファイル: fs.cpp プロジェクト: havlenapetr/Scummvm
bool FSNode::operator<(const FSNode& node) const {
	if (isDirectory() != node.isDirectory())
		return isDirectory();

	return getDisplayName().compareToIgnoreCase(node.getDisplayName()) < 0;
}