Skip to content

Commit

Permalink
Fixed C++ warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
iskunk committed Aug 7, 2017
1 parent 00d6e72 commit c35f715
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion FreeLingModules/config_squoia/config_squoia.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class config {
analyzer::invoke_options analyzer_invoke_options;

/// constructor
config(int ac, char **av) {
config(int ac, char **av) : analyzer_config_options(), analyzer_invoke_options() {

// Auxiliary variables to store options read as strings before they are converted
// to their final enumerate/integer values
Expand Down
26 changes: 13 additions & 13 deletions FreeLingModules/server_squoia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -346,48 +346,48 @@ config* load_config(int argc, char *argv[]) {
// ignore unneeded config files, to prevent analyer from loading modules we know we won't use
if (not cfg->analyzer_config_options.TOK_TokenizerFile.empty()
and (cfg->analyzer_invoke_options.InputLevel>TOKEN
or cfg->analyzer_invoke_options.OutputLevel<TOKEN)) cfg->analyzer_config_options.TOK_TokenizerFile = L"";
or cfg->analyzer_invoke_options.OutputLevel<TOKEN)) cfg->analyzer_config_options.TOK_TokenizerFile = std::wstring(L"");
if (not cfg->analyzer_config_options.SPLIT_SplitterFile.empty()
and (cfg->analyzer_invoke_options.InputLevel>SPLITTED
or cfg->analyzer_invoke_options.OutputLevel<SPLITTED)) cfg->analyzer_config_options.SPLIT_SplitterFile = L"";
or cfg->analyzer_invoke_options.OutputLevel<SPLITTED)) cfg->analyzer_config_options.SPLIT_SplitterFile = std::wstring(L"");
if (not cfg->analyzer_config_options.TAGGER_HMMFile.empty()
and (cfg->analyzer_invoke_options.TAGGER_which!=HMM
or (cfg->analyzer_invoke_options.InputLevel>TAGGED
or cfg->analyzer_invoke_options.OutputLevel<TAGGED))) cfg->analyzer_config_options.TAGGER_HMMFile = L"";
or cfg->analyzer_invoke_options.OutputLevel<TAGGED))) cfg->analyzer_config_options.TAGGER_HMMFile = std::wstring(L"");
if (not cfg->analyzer_config_options.TAGGER_RelaxFile.empty()
and (cfg->analyzer_invoke_options.TAGGER_which!=RELAX
or (cfg->analyzer_invoke_options.InputLevel>TAGGED
or cfg->analyzer_invoke_options.OutputLevel<TAGGED))) cfg->analyzer_config_options.TAGGER_RelaxFile = L"";
or cfg->analyzer_invoke_options.OutputLevel<TAGGED))) cfg->analyzer_config_options.TAGGER_RelaxFile = std::wstring(L"");
if (not cfg->analyzer_config_options.PARSER_GrammarFile.empty()
and (cfg->analyzer_invoke_options.InputLevel>SHALLOW
or cfg->analyzer_invoke_options.OutputLevel<SHALLOW)
and (cfg->analyzer_invoke_options.InputLevel>DEP
or cfg->analyzer_invoke_options.OutputLevel<DEP)) cfg->analyzer_config_options.PARSER_GrammarFile = L"";
or cfg->analyzer_invoke_options.OutputLevel<DEP)) cfg->analyzer_config_options.PARSER_GrammarFile = std::wstring(L"");
if (not cfg->analyzer_config_options.DEP_TxalaFile.empty()
and ((cfg->analyzer_invoke_options.DEP_which!=TXALA and cfg->analyzer_invoke_options.OutputLevel<COREF)
or (cfg->analyzer_invoke_options.InputLevel>DEP
or cfg->analyzer_invoke_options.OutputLevel<PARSED))) cfg->analyzer_config_options.DEP_TxalaFile = L"";
or cfg->analyzer_invoke_options.OutputLevel<PARSED))) cfg->analyzer_config_options.DEP_TxalaFile = std::wstring(L"");
if (not cfg->analyzer_config_options.DEP_TreelerFile.empty()
and ((cfg->analyzer_invoke_options.DEP_which!=TREELER and cfg->analyzer_invoke_options.OutputLevel<COREF)
or (cfg->analyzer_invoke_options.InputLevel>DEP
or cfg->analyzer_invoke_options.OutputLevel<DEP))) cfg->analyzer_config_options.DEP_TreelerFile = L"";
or cfg->analyzer_invoke_options.OutputLevel<DEP))) cfg->analyzer_config_options.DEP_TreelerFile = std::wstring(L"");
if (not cfg->analyzer_config_options.COREF_CorefFile.empty()
and (cfg->analyzer_invoke_options.InputLevel>=COREF
or cfg->analyzer_invoke_options.OutputLevel<COREF)) cfg->analyzer_config_options.COREF_CorefFile = L"";
or cfg->analyzer_invoke_options.OutputLevel<COREF)) cfg->analyzer_config_options.COREF_CorefFile = std::wstring(L"");

if (not cfg->analyzer_config_options.SEMGRAPH_SemGraphFile.empty()
and (cfg->analyzer_invoke_options.InputLevel>=SEMGRAPH
or cfg->analyzer_invoke_options.OutputLevel<SEMGRAPH))
cfg->analyzer_config_options.SEMGRAPH_SemGraphFile = L"";
cfg->analyzer_config_options.SEMGRAPH_SemGraphFile = std::wstring(L"");

if (not cfg->analyzer_config_options.PHON_PhoneticsFile.empty() and not cfg->analyzer_invoke_options.PHON_Phonetics)
cfg->analyzer_config_options.PHON_PhoneticsFile = L"";
cfg->analyzer_config_options.PHON_PhoneticsFile = std::wstring(L"");
if (not cfg->analyzer_config_options.NEC_NECFile.empty() and not cfg->analyzer_invoke_options.NEC_NEClassification)
cfg->analyzer_config_options.NEC_NECFile = L"";
cfg->analyzer_config_options.NEC_NECFile = std::wstring(L"");
if (not cfg->analyzer_config_options.SENSE_ConfigFile.empty() and cfg->analyzer_invoke_options.SENSE_WSD_which==NO_WSD)
cfg->analyzer_config_options.SENSE_ConfigFile = L"";
cfg->analyzer_config_options.SENSE_ConfigFile = std::wstring(L"");
if (not cfg->analyzer_config_options.UKB_ConfigFile.empty() and cfg->analyzer_invoke_options.SENSE_WSD_which!=UKB)
cfg->analyzer_config_options.UKB_ConfigFile = L"";
cfg->analyzer_config_options.UKB_ConfigFile = std::wstring(L"");

if (cfg->OutputFormat == OUT_NAF and cfg->InputMode != MODE_DOC) {
cfg->InputMode = MODE_DOC;
Expand Down
2 changes: 1 addition & 1 deletion MT_systems/squoia/esqu/outputSentences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) {
}
// if infile given, read this, if not, read from stdin (default)
if (infile != "") {
inputFile.exceptions ( std::ifstream::failbit | std::ifstream::badbit );
inputFile.exceptions ( std::ifstream::badbit );
try{
inputFile.open(infile.c_str(), std::ifstream::in);
pCin = &inputFile;
Expand Down

0 comments on commit c35f715

Please sign in to comment.