refactor(PD): change threadDescription into a vector
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user