Skip to content

Commit 7f11d1a

Browse files
NathanielVolfangojenkins
authored andcommitted
QPR-12013 -- Cleanup
1 parent ee68384 commit 7f11d1a

5 files changed

Lines changed: 8 additions & 9 deletions

File tree

Docs/UserGuide/simmcalibration.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ \subsubsection{SIMM Calibration}
6464
A SIMM Calibration is defined by a {\tt <SIMMCalibration>} node that defines a particular SIMM version, i.e.\ it defines a single set of risk weights, correlations, concentration thresholds and currency groups. The {\tt <SIMMCalibration>} has the following components:
6565
6666
\begin{enumerate}
67-
\item Version names - {\tt <VersionNames>}} \\
67+
\item Version names - {\tt <VersionNames>} \\
6868
This may contain any number of {\tt <Name>} sub-nodes, where each value will be associated with the given SIMM
6969
calibration. In order to use a given calibration, one of its names must be specified in the "version" parameter of the
7070
SIMM analytic (see Listing \ref{lst:ore_simm}). In the example lsting \ref{lst:simmcalibration_data} above, the SIMM

OREAnalytics/orea/simm/simmcalibration.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ void SimmCalibration::RiskClassData::fromXML(XMLNode* node) {
515515
}
516516
}
517517

518-
const string& SimmCalibration::version() const {
518+
const string SimmCalibration::version() const {
519519
if (versionNames_.empty()) {
520520
return "";
521521
} else {
@@ -655,7 +655,7 @@ const boost::shared_ptr<SimmCalibration>& SimmCalibrationData::getById(const str
655655
return data_.at(id);
656656
}
657657

658-
const boost::shared_ptr<SimmCalibration>& SimmCalibrationData::getBySimmVersion(const string& version) const {
658+
const boost::shared_ptr<SimmCalibration> SimmCalibrationData::getBySimmVersion(const string& version) const {
659659
for (const auto& kv : data_) {
660660
const auto& simmCalibrationData = kv.second;
661661
for (const string& scVersion : simmCalibrationData->versionNames()) {

OREAnalytics/orea/simm/simmcalibration.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class SimmCalibration : public ore::data::XMLSerializable {
267267
SimmCalibration() {}
268268
SimmCalibration(ore::data::XMLNode* node) { fromXML(node); }
269269

270-
const std::string& version() const;
270+
const std::string version() const;
271271
const std::vector<std::string>& versionNames() const { return versionNames_; }
272272
const std::vector<std::pair<std::string, std::string>>& additionalFields() const { return additionalFields_; }
273273

@@ -308,7 +308,7 @@ class SimmCalibrationData : public ore::data::XMLSerializable {
308308
void add(const boost::shared_ptr<SimmCalibration>&);
309309
bool hasId(const std::string& id) const { return data_.find(id) != data_.end(); }
310310
const boost::shared_ptr<SimmCalibration>& getById(const std::string& id) const;
311-
const boost::shared_ptr<SimmCalibration>& getBySimmVersion(const std::string& id) const;
311+
const boost::shared_ptr<SimmCalibration> getBySimmVersion(const std::string& id) const;
312312

313313
private:
314314
std::map<std::string, boost::shared_ptr<SimmCalibration>> data_;

OREAnalytics/orea/simm/simmconfigurationbase.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ vector<string> lookup(const RiskType& rt, const map<RiskType, vector<string>>& m
6262
}
6363

6464
std::ostream& operator<<(std::ostream& out, const tuple<string, string, string>& tup) {
65-
string res =
66-
"[Bucket: '" + std::get<0>(tup) + "', Label1: '" + std::get<1>(tup) + "', Label2: '" + std::get<2>(tup) + "']";
67-
out << res;
65+
return out << "[Bucket: '" << std::get<0>(tup) << "', Label1: '" << std::get<1>(tup) << "', Label2: '"
66+
<< std::get<2>(tup) << "']";
6867
}
6968

7069
string periodToLabels2(const QuantLib::Period& p) {

OREData/ored/utilities/xmlutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ string XMLUtils::getAttribute(XMLNode* node, const string& attrName) {
449449
}
450450

451451
vector<XMLNode*> XMLUtils::getChildrenNodes(XMLNode* node, const string& name) {
452-
QL_REQUIRE(node, "XMLUtils::getChildredNodes(" << name << ") node is NULL");
452+
QL_REQUIRE(node, "XMLUtils::getChildrenNodes(" << name << ") node is NULL");
453453
vector<XMLNode*> res;
454454
const char* p = name.empty() ? nullptr : name.c_str();
455455
for (xml_node<>* c = node->first_node(p); c; c = c->next_sibling(p))

0 commit comments

Comments
 (0)