mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-12 15:39:04 +08:00
Replace GenericVector<ParamsTrainingHypothesis> by std::vector<ParamsTrainingHypothesis>
This fixes an LGTM alert: This parameter of type ParamsTrainingHypothesis is 136 bytes - consider passing a const pointer/reference instead. It might also improve the performance. Signed-off-by: Stefan Weil <sw@weil.de>
This commit is contained in:
parent
aacd8ec3cf
commit
ebafb19a43
@ -2,7 +2,6 @@
|
|||||||
// File: params_training_featdef.h
|
// File: params_training_featdef.h
|
||||||
// Description: Feature definitions for params training.
|
// Description: Feature definitions for params training.
|
||||||
// Author: Rika Antonova
|
// Author: Rika Antonova
|
||||||
// Created: Mon Nov 28 11:26:42 PDT 2011
|
|
||||||
//
|
//
|
||||||
// (C) Copyright 2011, Google Inc.
|
// (C) Copyright 2011, Google Inc.
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -20,8 +19,8 @@
|
|||||||
#ifndef TESSERACT_WORDREC_PARAMS_TRAINING_FEATDEF_H_
|
#ifndef TESSERACT_WORDREC_PARAMS_TRAINING_FEATDEF_H_
|
||||||
#define TESSERACT_WORDREC_PARAMS_TRAINING_FEATDEF_H_
|
#define TESSERACT_WORDREC_PARAMS_TRAINING_FEATDEF_H_
|
||||||
|
|
||||||
#include "genericvector.h"
|
|
||||||
#include "strngs.h"
|
#include "strngs.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
|
||||||
@ -124,7 +123,7 @@ struct ParamsTrainingHypothesis {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// A list of hypotheses explored during one run of segmentation search.
|
// A list of hypotheses explored during one run of segmentation search.
|
||||||
using ParamsTrainingHypothesisList = GenericVector<ParamsTrainingHypothesis>;
|
using ParamsTrainingHypothesisList = std::vector<ParamsTrainingHypothesis>;
|
||||||
|
|
||||||
// A bundle that accumulates all of the hypothesis lists explored during all
|
// A bundle that accumulates all of the hypothesis lists explored during all
|
||||||
// of the runs of segmentation search on a word (e.g. a list of hypotheses
|
// of the runs of segmentation search on a word (e.g. a list of hypotheses
|
||||||
@ -146,7 +145,7 @@ class ParamsTrainingBundle {
|
|||||||
return hyp_list_vec.back().back();
|
return hyp_list_vec.back().back();
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericVector<ParamsTrainingHypothesisList> hyp_list_vec;
|
std::vector<ParamsTrainingHypothesisList> hyp_list_vec;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace tesseract
|
} // namespace tesseract
|
||||||
|
Loading…
Reference in New Issue
Block a user