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
path: root/moses
diff options
context:
space:
mode:
authorUlrich Germann <ulrich.germann@gmail.com>2017-01-14 20:56:01 +0300
committerUlrich Germann <ulrich.germann@gmail.com>2017-01-14 20:56:01 +0300
commit2e8bb0809bb2982e4e0f2316f7b18cc628dc3d6f (patch)
tree98416cd2cce390d4251023499f773e40b9f7ba79 /moses
parent403fd9039e88c8e4d4153cc87cabf282b728279e (diff)
tpt_tokenindex.cc: Indentation.
Diffstat (limited to 'moses')
-rw-r--r--moses/TranslationModel/UG/mm/tpt_tokenindex.cc44
1 files changed, 22 insertions, 22 deletions
diff --git a/moses/TranslationModel/UG/mm/tpt_tokenindex.cc b/moses/TranslationModel/UG/mm/tpt_tokenindex.cc
index 08e123782..4e8095f61 100644
--- a/moses/TranslationModel/UG/mm/tpt_tokenindex.cc
+++ b/moses/TranslationModel/UG/mm/tpt_tokenindex.cc
@@ -59,8 +59,8 @@ namespace sapt
comp.base = reinterpret_cast<char const*>(endIdx);
if (!unkToken.empty())
{
- Entry const* bla = lower_bound(startIdx,endIdx,unkToken.c_str(),comp);
- unkId = ((bla < endIdx && unkToken == comp.base+bla->offset)
+ Entry const* bla = lower_bound(startIdx,endIdx,unkToken.c_str(),comp);
+ unkId = ((bla < endIdx && unkToken == comp.base+bla->offset)
? bla->id
: numTokens);
}
@@ -98,10 +98,10 @@ namespace sapt
{
if (startIdx != endIdx)
{
- Entry const* bla = lower_bound(startIdx,endIdx,p,comp);
- if (bla != endIdx && !strcmp(comp.base+bla->offset,p))
- return bla->id;
- if (!dynamic) return unkId;
+ Entry const* bla = lower_bound(startIdx,endIdx,p,comp);
+ if (bla != endIdx && !strcmp(comp.base+bla->offset,p))
+ return bla->id;
+ if (!dynamic) return unkId;
}
else if (!dynamic) return strcmp(p,"NULL") && unkId;
@@ -155,10 +155,10 @@ namespace sapt
{
if (!ridx.size())
{
- boost::lock_guard<boost::mutex> lk(*this->lock);
- // Someone else (multi-threading!) may have created the
- // reverse index in the meantime, so let's check again
- if (!ridx.size()) ridx = reverseIndex();
+ boost::lock_guard<boost::mutex> lk(*this->lock);
+ // Someone else (multi-threading!) may have created the
+ // reverse index in the meantime, so let's check again
+ if (!ridx.size()) ridx = reverseIndex();
}
if (id < ridx.size())
return ridx[id];
@@ -175,8 +175,8 @@ namespace sapt
{
if (!ridx.size())
{
- boost::lock_guard<boost::mutex> lk(*this->lock);
- if (!ridx.size()) ridx = reverseIndex();
+ boost::lock_guard<boost::mutex> lk(*this->lock);
+ if (!ridx.size()) ridx = reverseIndex();
}
}
@@ -187,8 +187,8 @@ namespace sapt
{
if (!ridx.size())
{
- boost::lock_guard<boost::mutex> lk(*this->lock);
- if (!ridx.size()) ridx = reverseIndex();
+ boost::lock_guard<boost::mutex> lk(*this->lock);
+ if (!ridx.size()) ridx = reverseIndex();
}
if (id < ridx.size())
return ridx[id];
@@ -204,8 +204,8 @@ namespace sapt
{
if (!ridx.size())
{
- boost::lock_guard<boost::mutex> lk(*this->lock);
- if (!ridx.size()) ridx = reverseIndex();
+ boost::lock_guard<boost::mutex> lk(*this->lock);
+ if (!ridx.size()) ridx = reverseIndex();
}
ostringstream buf;
for (size_t i = 0; i < v.size(); i++)
@@ -219,8 +219,8 @@ namespace sapt
{
if (!ridx.size())
{
- boost::lock_guard<boost::mutex> lk(*this->lock);
- if (!ridx.size()) ridx = reverseIndex();
+ boost::lock_guard<boost::mutex> lk(*this->lock);
+ if (!ridx.size()) ridx = reverseIndex();
}
ostringstream buf;
for (size_t i = 0; i < v.size(); i++)
@@ -234,8 +234,8 @@ namespace sapt
{
if (!ridx.size())
{
- boost::lock_guard<boost::mutex> lk(*this->lock);
- if (!ridx.size()) ridx = reverseIndex();
+ boost::lock_guard<boost::mutex> lk(*this->lock);
+ if (!ridx.size()) ridx = reverseIndex();
}
ostringstream buf;
if (start < stop)
@@ -251,8 +251,8 @@ namespace sapt
{
if (!ridx.size())
{
- boost::lock_guard<boost::mutex> lk(*this->lock);
- if (!ridx.size()) ridx = reverseIndex();
+ boost::lock_guard<boost::mutex> lk(*this->lock);
+ if (!ridx.size()) ridx = reverseIndex();
}
ostringstream buf;
if (start < stop)