mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
return empty EdgePath() on error
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37227 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a26dd20159
commit
d9a4a443e7
@ -167,12 +167,11 @@ Graph::EdgePath const Graph::getPath(int from, int to)
|
|||||||
{
|
{
|
||||||
Mutex::Locker lock(&mutex_);
|
Mutex::Locker lock(&mutex_);
|
||||||
|
|
||||||
static const EdgePath path;
|
|
||||||
if (from == to)
|
if (from == to)
|
||||||
return path;
|
return EdgePath();
|
||||||
|
|
||||||
if (to < 0 || !bfs_init(from))
|
if (to < 0 || !bfs_init(from))
|
||||||
return path;
|
return EdgePath();
|
||||||
|
|
||||||
clearPaths();
|
clearPaths();
|
||||||
while (!Q_.empty()) {
|
while (!Q_.empty()) {
|
||||||
@ -201,7 +200,7 @@ Graph::EdgePath const Graph::getPath(int from, int to)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// failure
|
// failure
|
||||||
return path;
|
return EdgePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user