-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension of bruker precursor information (2nd attempt) #3191
base: master
Are you sure you want to change the base?
Changes from 1 commit
ba475f1
c9f071e
5c7e77a
e8e5c5e
112bf17
0b8ffc4
ee17fef
8aeecd0
0f3b1a3
8104588
3ab4cff
912c3c6
56949cf
e7bf0d5
3e7fd96
5f5a974
ef4e5d4
e2e6ea2
bb1a8ee
853d207
701ac75
a80d333
f4213a0
e487769
73aca39
c18d414
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -365,9 +365,9 @@ class SpectrumList_MGFImpl : public SpectrumList_MGF | |
return -1; // not found | ||
|
||
start += strlen(startTag); | ||
const string endTags[] = { "", " ", ",",";","\n","\r","\t" }; | ||
const string endTags[] = { " ", ",",";","\t" }; | ||
string ccsStr; | ||
|
||
for(int i=0; i< sizeof(endTags)/sizeof(endTags[0]); i++) | ||
{ | ||
const size_t end = title.find(endTags[i], start); | ||
|
@@ -379,6 +379,9 @@ class SpectrumList_MGFImpl : public SpectrumList_MGF | |
} | ||
} | ||
|
||
if(ccsStr.empty()) | ||
ccsStr = title.substr(start, title.length() - start); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this can be simplified to:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay, looks good, I change this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
||
try | ||
{ | ||
return boost::lexical_cast<double>(ccsStr); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary? I would expect the new CCS-in-title code to round trip the CCS so the title will be preserved and not different. What diffs were you getting without this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, unfortunately it is different. The serializer writes it into the title string, but the reference does not contain the text ‘ccs=...’. But this reference is used for both - reading and writing.
The other cases of code where the title is extended too seem not to run through the test, so it was not a problem there.