I'm getting the following error when i try to compile
Code: Select all
[SRC] Compiling gfx_layout.cpp
/home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp: In member function ‘virtual std::unique_ptr<const ParagraphLayouter::Line> FallbackParagraphLayout::NextLine(int)’:
/home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:513:10: error: cannot bind ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>’ lvalue to ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>&&’
return l;
^
In file included from /usr/include/c++/4.9/memory:81:0,
from /home/dasy2k1/games/OpenTTD/src/stdafx.h:87,
from /home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:10:
/usr/include/c++/4.9/bits/unique_ptr.h:220:2: note: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = FallbackParagraphLayout::FallbackLine; _Ep = std::default_delete<FallbackParagraphLayout::FallbackLine>; <template-parameter-2-3> = void; _Tp = const ParagraphLayouter::Line; _Dp = std::default_delete<const ParagraphLayouter::Line>]’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:563:13: error: cannot bind ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>’ lvalue to ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>&&’
return l;
^
In file included from /usr/include/c++/4.9/memory:81:0,
from /home/dasy2k1/games/OpenTTD/src/stdafx.h:87,
from /home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:10:
/usr/include/c++/4.9/bits/unique_ptr.h:220:2: note: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = FallbackParagraphLayout::FallbackLine; _Ep = std::default_delete<FallbackParagraphLayout::FallbackLine>; <template-parameter-2-3> = void; _Tp = const ParagraphLayouter::Line; _Dp = std::default_delete<const ParagraphLayouter::Line>]’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:590:9: error: cannot bind ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>’ lvalue to ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>&&’
return l;
^
In file included from /usr/include/c++/4.9/memory:81:0,
from /home/dasy2k1/games/OpenTTD/src/stdafx.h:87,
from /home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:10:
/usr/include/c++/4.9/bits/unique_ptr.h:220:2: note: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = FallbackParagraphLayout::FallbackLine; _Ep = std::default_delete<FallbackParagraphLayout::FallbackLine>; <template-parameter-2-3> = void; _Tp = const ParagraphLayouter::Line; _Dp = std::default_delete<const ParagraphLayouter::Line>]’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:591:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:234: recipe for target 'gfx_layout.o' failed
make[1]: *** [gfx_layout.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/mnt/shared/games/OpenTTD/objs/release'
Makefile:54: recipe for target 'all' failed
make: *** [all] Error 1