Skip to content

Commit

Permalink
use nan as return values of unreachable branch
Browse files Browse the repository at this point in the history
  • Loading branch information
nastasi-oq committed Mar 9, 2019
1 parent 7c6b66b commit 88edd8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/layout/qgslayoutaligner.cpp
Expand Up @@ -14,6 +14,8 @@
* *
***************************************************************************/

#include <cmath>

#include "qgslayoutaligner.h"
#include "qgslayoutitem.h"
#include "qgslayout.h"
Expand Down Expand Up @@ -177,7 +179,7 @@ void QgsLayoutAligner::distributeItems( QgsLayout *layout, const QList<QgsLayout
case DistributeHSpace:
case DistributeVSpace:
// not reachable branch, just to avoid compilation warning
return 0.0;
return nan("");
}
// no warnings
return itemBBox.left();
Expand Down

0 comments on commit 88edd8b

Please sign in to comment.