Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
182cdbfc
Commit
182cdbfc
authored
Jul 06, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uses smart_less for position() script function
parent
16fd9c9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
src/util/order_cache.hpp
src/util/order_cache.hpp
+1
-1
src/util/string.cpp
src/util/string.cpp
+1
-0
No files found.
src/util/order_cache.hpp
View file @
182cdbfc
...
@@ -47,7 +47,7 @@ struct OrderCache<T>::CompareValues {
...
@@ -47,7 +47,7 @@ struct OrderCache<T>::CompareValues {
CompareValues
(
const
vector
<
String
>&
values
)
:
values
(
values
)
{}
CompareValues
(
const
vector
<
String
>&
values
)
:
values
(
values
)
{}
inline
bool
operator
()
(
const
KV
&
a
,
const
KV
&
b
)
{
inline
bool
operator
()
(
const
KV
&
a
,
const
KV
&
b
)
{
return
values
[
a
.
second
]
<
values
[
b
.
second
]
;
return
smart_less
(
values
[
a
.
second
],
values
[
b
.
second
])
;
}
}
};
};
...
...
src/util/string.cpp
View file @
182cdbfc
...
@@ -221,6 +221,7 @@ bool smart_less(const String& as, const String& bs) {
...
@@ -221,6 +221,7 @@ bool smart_less(const String& as, const String& bs) {
return
lt
;
return
lt
;
}
else
{
}
else
{
// compare characters
// compare characters
// TODO: decompose characters, in particular AE and accents
Char
la
=
toLower
(
a
),
lb
=
toLower
(
b
);
Char
la
=
toLower
(
a
),
lb
=
toLower
(
b
);
if
(
la
<
lb
)
return
true
;
if
(
la
<
lb
)
return
true
;
if
(
la
>
lb
)
return
false
;
if
(
la
>
lb
)
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment