refactor(PD): change threadDescription into a vector

This commit is contained in:
Alfredo Monclus
2025-01-03 11:54:07 -03:00
parent 04ff8988ce
commit 62ab74d2df
2 changed files with 3 additions and 5 deletions

View File

@@ -83,7 +83,7 @@ const char* Hole::ThreadClass_None_Enums[] = { "None", nullptr };
*/
const Hole::ThreadDescription Hole::threadDescription[][171] =
const std::vector<Hole::ThreadDescription> Hole::threadDescription[] =
{
/* None */
{
@@ -617,9 +617,7 @@ const Hole::UTSClearanceDefinition Hole::UTSHoleDiameters[22] =
std::vector<std::string> getThreadDesignations(const int threadType) {
std::vector<std::string> designations;
for (const auto& thread : Hole::threadDescription[threadType]) {
if (thread.designation != nullptr) {
designations.emplace_back(thread.designation);
}
designations.push_back(thread.designation);
}
return designations;
}

View File

@@ -92,7 +92,7 @@ public:
double pitch;
double TapDrill;
};
static const ThreadDescription threadDescription[][171];
static const std::vector<Hole::ThreadDescription> threadDescription[];
static const double metricHoleDiameters[51][4];