Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
VertexArray#initialize now behavs like constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Groogy committed Dec 30, 2015
1 parent 57dcd9f commit af07ec6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/rbsfml/rbvertexarray.cpp
Expand Up @@ -68,11 +68,12 @@ rb::Value rbVertexArray::initialize(rb::Value self, const std::vector<rb::Value>
case 0:
break;
case 2:
object.setPrimitiveType(args[0].to<sf::PrimitiveType>());
object.resize(args[1].to<unsigned int>());
case 1:
object.setPrimitiveType(args[0].to<sf::PrimitiveType>());
break;
default:
rb::expectedNumArgs(args.size(), "0 or 2");
rb::expectedNumArgs(args.size(), 0, 2);
break;
}

Expand Down

0 comments on commit af07ec6

Please sign in to comment.