Skip to content
Snippets Groups Projects
Commit b882e02b authored by Franck Dary's avatar Franck Dary
Browse files

Fixed unused parameter warnings

parent cf619b31
No related branches found
No related tags found
No related merge requests found
......@@ -369,7 +369,7 @@ Action Action::addHypothesisRelativeRelaxed(const std::string & colName, Config:
return addHypothesis(colName, lineIndex, "").undo(config, a);
};
auto appliable = [colName, object, relativeIndex](const Config & config, const Action & a)
auto appliable = [](const Config &, const Action &)
{
return true;
};
......@@ -487,7 +487,7 @@ Action Action::emptyStack()
}
};
auto appliable = [](const Config & config, const Action &)
auto appliable = [](const Config &, const Action &)
{
return true;
};
......@@ -497,12 +497,12 @@ Action Action::emptyStack()
Action Action::ignoreCurrentCharacter()
{
auto apply = [](Config & config, Action & a)
auto apply = [](Config & config, Action &)
{
config.moveCharacterIndex(1);
};
auto undo = [](Config & config, Action & a)
auto undo = [](Config & config, Action &)
{
config.moveCharacterIndex(-1);
};
......@@ -575,7 +575,7 @@ Action Action::assertIsNotEmpty(const std::string & colName, Config::Object obje
Action Action::addCharsToCol(const std::string & col, int n, Config::Object object, int relativeIndex)
{
auto apply = [col, n, object, relativeIndex](Config & config, Action & a)
auto apply = [col, n, object, relativeIndex](Config & config, Action &)
{
auto index = config.getRelativeWordIndex(object, relativeIndex);
auto & curWord = config.getLastNotEmptyHyp(col, index);
......@@ -591,7 +591,7 @@ Action Action::addCharsToCol(const std::string & col, int n, Config::Object obje
curWord = fmt::format("{}{}", curWord, config.getLetter(config.getCharacterIndex()+i));
};
auto undo = [col, n, object, relativeIndex](Config & config, Action & a)
auto undo = [col, n, object, relativeIndex](Config & config, Action &)
{
auto index = config.getRelativeWordIndex(object, relativeIndex);
auto & curWord = config.getLastNotEmptyHyp(col, index);
......@@ -703,7 +703,7 @@ Action Action::setRoot(int bufferIndex)
Action Action::updateIds(int bufferIndex)
{
auto apply = [bufferIndex](Config & config, Action & a)
auto apply = [bufferIndex](Config & config, Action &)
{
int lineIndex = config.getRelativeWordIndex(Config::Object::Buffer, bufferIndex);
int firstIndexOfSentence = -1;
......@@ -762,7 +762,7 @@ Action Action::updateIds(int bufferIndex)
}
};
auto undo = [](Config & config, Action & a)
auto undo = [](Config &, Action &)
{
// TODO : undo this
};
......@@ -796,7 +796,7 @@ Action Action::attach(Config::Object governorObject, int governorIndex, Config::
a.data.pop_back();
};
auto appliable = [governorObject, governorIndex, dependentObject, dependentIndex](const Config & config, const Action & action)
auto appliable = [governorObject, governorIndex, dependentObject, dependentIndex](const Config & config, const Action &)
{
if (!config.hasRelativeWordIndex(governorObject, governorIndex) or !config.hasRelativeWordIndex(dependentObject, dependentIndex))
return false;
......@@ -815,15 +815,6 @@ Action Action::attach(Config::Object governorObject, int governorIndex, Config::
if (!util::isEmpty(config.getAsFeature(Config::headColName, depLineIndex)))
return false;
// Check for cycles
// while (govLineIndex != depLineIndex)
// {
// try
// {
// govLineIndex = std::stoi(config.getAsFeature(Config::headColName, govLineIndex));
// } catch(std::exception &) {return true;}
// }
return true;
};
......@@ -859,7 +850,7 @@ Action Action::split(int index)
Action Action::setRootUpdateIdsEmptyStackIfSentChanged()
{
auto apply = [](Config & config, Action & a)
auto apply = [](Config & config, Action &)
{
int lineIndex = config.getWordIndex();
int rootIndex = lineIndex;
......@@ -934,7 +925,7 @@ Action Action::setRootUpdateIdsEmptyStackIfSentChanged()
config.popStack();
};
auto undo = [](Config & config, Action & a)
auto undo = [](Config &, Action &)
{
//TODO undo this
};
......@@ -960,7 +951,7 @@ Action Action::deprel(std::string value)
addHypothesis(Config::deprelColName, config.getLastAttached(), "").undo(config, a);
};
auto appliable = [](const Config & config, const Action & action)
auto appliable = [](const Config & config, const Action &)
{
return config.has(0,config.getLastAttached(),0);
};
......@@ -1062,7 +1053,7 @@ Action Action::uppercaseIndex(std::string col, Config::Object obj, int index, in
addHypothesis(col, lineIndex, fmt::format("{}", res)).apply(config, a);
};
auto undo = [col, obj, index](Config & config, Action & a)
auto undo = [col, obj, index](Config & config, Action &)
{
int lineIndex = config.getRelativeWordIndex(obj, index);
auto & value = config.getLastNotEmptyHyp(col, lineIndex);
......@@ -1126,7 +1117,7 @@ Action Action::lowercaseIndex(std::string col, Config::Object obj, int index, in
addHypothesis(col, lineIndex, fmt::format("{}", res)).apply(config, a);
};
auto undo = [col, obj, index](Config & config, Action & a)
auto undo = [col, obj, index](Config & config, Action &)
{
int lineIndex = config.getRelativeWordIndex(obj, index);
auto & value = config.getLastNotEmptyHyp(col, lineIndex);
......
#include "CNN.hpp"
#include "fmt/core.h"
CNNImpl::CNNImpl(int inputSize, int outputSize, ModuleOptions options) : outputSize(outputSize)
CNNImpl::CNNImpl(int inputSize, int outputSize, ModuleOptions) : outputSize(outputSize)
{
for (auto & windowSize : windowSizes)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment