Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Spacer : public ElementEx
- {
- public:
- Spacer(Vector2& size)
- : ElementEx(ElementProperties(AnchoredPosition(), size), TouchBehaviour::PassThrough)
- {
- }
- };
- // Does not work
- rowContainer->Register(new Spacer(Vector2(maxWidth, height)));
- // Works
- Vector2 spacerSize(maxWidth, height);
- rowContainer->Register(new Spacer(spacerSize));
- /*
- the "does not work line" generates these errors:
- Candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Vector2' to 'const <anonymous>::Spacer' for 1st argument
- Candidate constructor not viable: expects an l-value for 1st argument
- */
Advertisement
Add Comment
Please, Sign In to add comment