Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMosesAdmin <moses-support-owner@mit.edu>2015-10-22 02:00:41 +0300
committerMosesAdmin <moses-support-owner@mit.edu>2015-10-22 02:00:41 +0300
commit37f7bb687e8cb7b7fdf240cea43041df03532961 (patch)
treefe2b29731c7f33d9a25a1bb1d51ef7b7517cb79d /moses/ContextScope.h
parentd59bb883dcff98f0ab889627091ed930368091b8 (diff)
daily automatic beautifier
Diffstat (limited to 'moses/ContextScope.h')
-rw-r--r--moses/ContextScope.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/moses/ContextScope.h b/moses/ContextScope.h
index fd869ef0e..18880db13 100644
--- a/moses/ContextScope.h
+++ b/moses/ContextScope.h
@@ -12,7 +12,7 @@
#include <boost/foreach.hpp>
#endif
-// for some reason, the xmlrpc_c headers must be included AFTER the
+// for some reason, the xmlrpc_c headers must be included AFTER the
// boost thread-related ones ...
#ifdef HAVE_XMLRPC_C
#include <xmlrpc-c/base.hpp>
@@ -111,18 +111,16 @@ public:
#ifdef HAVE_XMLRPC_C
SPTR<std::map<std::string,float> >
- GetContextWeights(xmlrpc_c::value const* spec = NULL)
- {
- if (spec && m_context_weights == NULL)
- {
- boost::unique_lock<boost::shared_mutex> lock(m_lock);
- m_context_weights.reset(new std::map<std::string, float>);
-
- typedef std::map<std::string,xmlrpc_c::value> tmap;
- tmap const tmp = static_cast<tmap>(xmlrpc_c::value_struct(*spec));
- for(tmap::const_iterator m = tmp.begin(); m != tmp.end(); ++m)
- (*m_context_weights)[m->first] = xmlrpc_c::value_double(m->second);
- }
+ GetContextWeights(xmlrpc_c::value const* spec = NULL) {
+ if (spec && m_context_weights == NULL) {
+ boost::unique_lock<boost::shared_mutex> lock(m_lock);
+ m_context_weights.reset(new std::map<std::string, float>);
+
+ typedef std::map<std::string,xmlrpc_c::value> tmap;
+ tmap const tmp = static_cast<tmap>(xmlrpc_c::value_struct(*spec));
+ for(tmap::const_iterator m = tmp.begin(); m != tmp.end(); ++m)
+ (*m_context_weights)[m->first] = xmlrpc_c::value_double(m->second);
+ }
return m_context_weights;
}
#endif