Skip to content
Snippets Groups Projects
Commit fcf35bff authored by Studer Gabriel's avatar Studer Gabriel
Browse files

silence compiler warnings

parent e350a7e9
No related branches found
No related tags found
No related merge requests found
...@@ -138,11 +138,13 @@ String EntityTypeFromChainType(ChainType type) { ...@@ -138,11 +138,13 @@ String EntityTypeFromChainType(ChainType type) {
case ost::mol::CHAINTYPE_POLY_PEPTIDE_DN_RN: return "polymer"; case ost::mol::CHAINTYPE_POLY_PEPTIDE_DN_RN: return "polymer";
case ost::mol::CHAINTYPE_BRANCHED: return "branched"; case ost::mol::CHAINTYPE_BRANCHED: return "branched";
case ost::mol::CHAINTYPE_OLIGOSACCHARIDE: return "branched"; case ost::mol::CHAINTYPE_OLIGOSACCHARIDE: return "branched";
default: {
std::stringstream ss;
ss <<"Unknown ChainType item found: '" << type << "'!";
throw Error(ss.str());
}
} }
std::stringstream ss("Unknown ChainType item found: '");
ss << type << "'!";
throw Error(ss.str());
} }
String EntityPolyTypeFromChainType(ChainType type) { String EntityPolyTypeFromChainType(ChainType type) {
...@@ -157,22 +159,25 @@ String EntityPolyTypeFromChainType(ChainType type) { ...@@ -157,22 +159,25 @@ String EntityPolyTypeFromChainType(ChainType type) {
case ost::mol::CHAINTYPE_POLY_DN_RN: return "polydeoxyribonucleotide/polyribonucleotide hybrid"; case ost::mol::CHAINTYPE_POLY_DN_RN: return "polydeoxyribonucleotide/polyribonucleotide hybrid";
case ost::mol::CHAINTYPE_CYCLIC_PSEUDO_PEPTIDE: return "cyclic-pseudo-peptide"; case ost::mol::CHAINTYPE_CYCLIC_PSEUDO_PEPTIDE: return "cyclic-pseudo-peptide";
case ost::mol::CHAINTYPE_POLY_PEPTIDE_DN_RN: return "peptide nucleic acid"; case ost::mol::CHAINTYPE_POLY_PEPTIDE_DN_RN: return "peptide nucleic acid";
default: {
std::stringstream ss;
ss << "Cannot return entity poly type from chain of type: '" << type << "'!";
throw Error(ss.str());
}
} }
std::stringstream ss("Cannot return entity poly type from chain of type: '");
ss << type << "'!";
throw Error(ss.str());
} }
String BranchedTypeFromChainType(ChainType type) { String BranchedTypeFromChainType(ChainType type) {
switch(type) { switch(type) {
case ost::mol::CHAINTYPE_BRANCHED: return "oligosaccharide"; // the only one case ost::mol::CHAINTYPE_BRANCHED: return "oligosaccharide"; // the only one
case ost::mol::CHAINTYPE_OLIGOSACCHARIDE: return "oligosaccharide"; case ost::mol::CHAINTYPE_OLIGOSACCHARIDE: return "oligosaccharide";
default: {
std::stringstream ss;
ss << "Cannot return branched type from chain of type: '" << type << "'!";
throw Error(ss.str());
}
} }
std::stringstream ss("Cannot return branched type from chain of type: '");
ss << type << "'!";
throw Error(ss.str());
} }
}} //ns }} //ns
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment