mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +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_);
|
||||
|
||||
static const EdgePath path;
|
||||
if (from == to)
|
||||
return path;
|
||||
return EdgePath();
|
||||
|
||||
if (to < 0 || !bfs_init(from))
|
||||
return path;
|
||||
return EdgePath();
|
||||
|
||||
clearPaths();
|
||||
while (!Q_.empty()) {
|
||||
@ -201,7 +200,7 @@ Graph::EdgePath const Graph::getPath(int from, int to)
|
||||
}
|
||||
}
|
||||
// failure
|
||||
return path;
|
||||
return EdgePath();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user