16 lines
410 B
C++
16 lines
410 B
C++
#include "diagram.h"
|
|
|
|
bool shareComponent(const DiagramEditorRouteInfo& a,const DiagramEditorRouteInfo& b) //计算两个线路是否相交
|
|
{
|
|
if (a.lstCompo.isEmpty() || b.lstCompo.isEmpty())
|
|
return false;
|
|
|
|
for (const auto& ca : a.lstCompo) {
|
|
for (const auto& cb : b.lstCompo) {
|
|
if (ca.sName == cb.sName)
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|