Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
af412c28
Unverified
Commit
af412c28
authored
Oct 20, 2021
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up
parent
874cd3ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
49 deletions
+0
-49
include/cif++/CifUtils.hpp
+0
-2
src/Cif++.cpp
+0
-20
src/CifUtils.cpp
+0
-27
No files found.
include/cif++/CifUtils.hpp
View file @
af412c28
...
@@ -67,9 +67,7 @@ std::string get_version_nr();
...
@@ -67,9 +67,7 @@ std::string get_version_nr();
// some basic utilities: Since we're using ASCII input only, we define for optimisation
// some basic utilities: Since we're using ASCII input only, we define for optimisation
// our own case conversion routines.
// our own case conversion routines.
// bool iequals(const std::string &a, const std::string &b);
bool
iequals
(
std
::
string_view
a
,
std
::
string_view
b
);
bool
iequals
(
std
::
string_view
a
,
std
::
string_view
b
);
// int icompare(const std::string &a, const std::string &b);
int
icompare
(
std
::
string_view
a
,
std
::
string_view
b
);
int
icompare
(
std
::
string_view
a
,
std
::
string_view
b
);
bool
iequals
(
const
char
*
a
,
const
char
*
b
);
bool
iequals
(
const
char
*
a
,
const
char
*
b
);
...
...
src/Cif++.cpp
View file @
af412c28
...
@@ -395,26 +395,6 @@ auto Datablock::emplace(std::string_view name) -> std::tuple<iterator, bool>
...
@@ -395,26 +395,6 @@ auto Datablock::emplace(std::string_view name) -> std::tuple<iterator, bool>
mCategories
.
emplace
(
begin
(),
*
this
,
std
::
string
(
name
),
mValidator
);
mCategories
.
emplace
(
begin
(),
*
this
,
std
::
string
(
name
),
mValidator
);
return
std
::
make_tuple
(
begin
(),
isNew
);
return
std
::
make_tuple
(
begin
(),
isNew
);
// bool isNew = false;
// iterator i = find_if(begin(), end(), [name](const Category &cat) -> bool
// { return iequals(cat.name(), name); });
// if (i == end())
// {
// isNew = true;
// i = mCategories.emplace(begin(), *this, std::string(name), mValidator);
// }
// else if (i != begin())
// {
// auto n = std::next(i);
// mCategories.splice(begin(), mCategories, i, n);
// i = mCategories.begin();
// }
// return std::make_tuple(i, isNew);
}
}
Category
&
Datablock
::
operator
[](
std
::
string_view
name
)
Category
&
Datablock
::
operator
[](
std
::
string_view
name
)
...
...
src/CifUtils.cpp
View file @
af412c28
...
@@ -123,14 +123,6 @@ const uint8_t kCharToLowerMap[256] =
...
@@ -123,14 +123,6 @@ const uint8_t kCharToLowerMap[256] =
// --------------------------------------------------------------------
// --------------------------------------------------------------------
bool
iequals
(
const
std
::
string
&
a
,
const
std
::
string
&
b
)
{
bool
result
=
a
.
length
()
==
b
.
length
();
for
(
auto
ai
=
a
.
begin
(),
bi
=
b
.
begin
();
result
and
ai
!=
a
.
end
()
and
bi
!=
b
.
end
();
++
ai
,
++
bi
)
result
=
tolower
(
*
ai
)
==
tolower
(
*
bi
);
return
result
;
}
bool
iequals
(
std
::
string_view
a
,
std
::
string_view
b
)
bool
iequals
(
std
::
string_view
a
,
std
::
string_view
b
)
{
{
bool
result
=
a
.
length
()
==
b
.
length
();
bool
result
=
a
.
length
()
==
b
.
length
();
...
@@ -148,25 +140,6 @@ bool iequals(const char *a, const char *b)
...
@@ -148,25 +140,6 @@ bool iequals(const char *a, const char *b)
return
result
and
*
a
==
*
b
;
return
result
and
*
a
==
*
b
;
}
}
int
icompare
(
const
std
::
string
&
a
,
const
std
::
string
&
b
)
{
int
d
=
0
;
auto
ai
=
a
.
begin
(),
bi
=
b
.
begin
();
for
(;
d
==
0
and
ai
!=
a
.
end
()
and
bi
!=
b
.
end
();
++
ai
,
++
bi
)
d
=
tolower
(
*
ai
)
-
tolower
(
*
bi
);
if
(
d
==
0
)
{
if
(
ai
!=
a
.
end
())
d
=
1
;
else
if
(
bi
!=
b
.
end
())
d
=
-
1
;
}
return
d
;
}
int
icompare
(
std
::
string_view
a
,
std
::
string_view
b
)
int
icompare
(
std
::
string_view
a
,
std
::
string_view
b
)
{
{
int
d
=
0
;
int
d
=
0
;
...
...
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