Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Seismic
Seismic DMS Suite
seismic-dms-cpp-lib
Commits
d51b8bf8
Commit
d51b8bf8
authored
Dec 03, 2021
by
Sid Stenersen
Browse files
fix: serializing
parent
94c74c7f
Pipeline
#80175
passed with stages
in 15 minutes and 16 seconds
Changes
6
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/src/core/SDManagerImpl.h
View file @
d51b8bf8
...
@@ -151,7 +151,7 @@ namespace seismicdrive
...
@@ -151,7 +151,7 @@ namespace seismicdrive
void
deserialize
(
const
std
::
string
&
sdms
)
void
deserialize
(
const
std
::
string
&
sdms
)
{
{
auto
tokens
=
sdutils
::
split
(
sdms
,
';'
);
auto
tokens
=
sdutils
::
split
(
sdms
,
';'
,
true
);
if
(
tokens
[
0
]
!=
sdconfig
::
SDMANAGER_SERIALV
)
if
(
tokens
[
0
]
!=
sdconfig
::
SDMANAGER_SERIALV
)
{
{
throw
error
::
manager
::
context
::
UnknownFormat
(
1
);
throw
error
::
manager
::
context
::
UnknownFormat
(
1
);
...
...
src/src/core/SDReadOnlyGenericDatasetAccessor.cc
View file @
d51b8bf8
...
@@ -37,7 +37,7 @@ namespace seismicdrive
...
@@ -37,7 +37,7 @@ namespace seismicdrive
explicit
Impl
(
const
std
::
string
&
sdms
,
SDManager
*
sdManager
=
nullptr
)
explicit
Impl
(
const
std
::
string
&
sdms
,
SDManager
*
sdManager
=
nullptr
)
:
_sdmanager
(
sdManager
)
:
_sdmanager
(
sdManager
)
{
{
std
::
vector
<
std
::
string
>
tokens
=
sdutils
::
split
(
sdms
,
';'
,
5
);
std
::
vector
<
std
::
string
>
tokens
=
sdutils
::
split
(
sdms
,
';'
,
true
,
5
);
if
(
tokens
[
0
]
!=
sdconfig
::
SDROGDATASET_SERIALV
)
if
(
tokens
[
0
]
!=
sdconfig
::
SDROGDATASET_SERIALV
)
{
{
throw
error
::
dataset
::
Error
({
sdmex
::
dsgenericreadonly
::
WrongSerializationVersion
(),
""
});
throw
error
::
dataset
::
Error
({
sdmex
::
dsgenericreadonly
::
WrongSerializationVersion
(),
""
});
...
...
src/src/lib/shared/utils.cc
View file @
d51b8bf8
...
@@ -208,13 +208,13 @@ namespace seismicdrive
...
@@ -208,13 +208,13 @@ namespace seismicdrive
}
}
}
}
std
::
vector
<
std
::
string
>
split
(
const
std
::
string
&
s
,
char
delimiter
,
size_t
maxTokens
)
std
::
vector
<
std
::
string
>
split
(
const
std
::
string
&
s
,
char
delimiter
,
bool
keepEmpty
,
size_t
maxTokens
)
{
{
std
::
vector
<
std
::
string
>
v
;
std
::
vector
<
std
::
string
>
v
;
for
(
size_t
a
=
0
;;)
for
(
size_t
a
=
0
;;)
{
{
auto
b
=
s
.
find
(
delimiter
,
a
);
auto
b
=
s
.
find
(
delimiter
,
a
);
if
(
b
!=
a
)
if
(
keepEmpty
||
b
!=
a
)
{
{
if
(
v
.
size
()
==
maxTokens
-
1
)
if
(
v
.
size
()
==
maxTokens
-
1
)
{
{
...
...
src/src/lib/shared/utils.h
View file @
d51b8bf8
...
@@ -74,7 +74,7 @@ namespace seismicdrive
...
@@ -74,7 +74,7 @@ namespace seismicdrive
void
stringsFromArchive
(
std
::
istringstream
&
archive
,
std
::
vector
<
std
::
string
>
&
ss
);
void
stringsFromArchive
(
std
::
istringstream
&
archive
,
std
::
vector
<
std
::
string
>
&
ss
);
std
::
vector
<
std
::
string
>
split
(
const
std
::
string
&
s
,
char
delimiter
,
size_t
maxTokens
=
std
::
string
::
npos
);
std
::
vector
<
std
::
string
>
split
(
const
std
::
string
&
s
,
char
delimiter
,
bool
keepEmpty
,
size_t
maxTokens
=
std
::
string
::
npos
);
uint64_t
getAuthTokenExpiration
(
const
std
::
string
&
authToken
,
const
std
::
string
&
tag
=
""
);
uint64_t
getAuthTokenExpiration
(
const
std
::
string
&
authToken
,
const
std
::
string
&
tag
=
""
);
...
...
src/src/lib/shared/utils_ext.cc
View file @
d51b8bf8
...
@@ -36,7 +36,7 @@ namespace seismicdrive
...
@@ -36,7 +36,7 @@ namespace seismicdrive
uint64_t
getAuthTokenExpiration
(
const
std
::
string
&
authToken
,
const
std
::
string
&
tag
)
uint64_t
getAuthTokenExpiration
(
const
std
::
string
&
authToken
,
const
std
::
string
&
tag
)
{
{
std
::
string
payload
;
std
::
string
payload
;
auto
s
=
sdutils
::
split
(
authToken
,
'.'
);
auto
s
=
sdutils
::
split
(
authToken
,
'.'
,
false
);
if
(
s
.
size
()
>
1
)
if
(
s
.
size
()
>
1
)
{
{
payload
=
s
[
1
];
payload
=
s
[
1
];
...
...
src/test/shared/test_runner.cc
View file @
d51b8bf8
...
@@ -160,7 +160,7 @@ TestRunner *TestRunner::Create(int argc, char *argv[])
...
@@ -160,7 +160,7 @@ TestRunner *TestRunner::Create(int argc, char *argv[])
if
(
maxth
.
size
())
if
(
maxth
.
size
())
{
{
params
.
maxThreads
.
clear
();
params
.
maxThreads
.
clear
();
for
(
auto
s
:
sdutils
::
split
(
maxth
,
','
))
for
(
auto
s
:
sdutils
::
split
(
maxth
,
','
,
false
))
{
{
params
.
maxThreads
.
push_back
(
std
::
stoi
(
s
));
params
.
maxThreads
.
push_back
(
std
::
stoi
(
s
));
}
}
...
...
Write
Preview
Supports
Markdown
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