Make some arguments in PCKPacker methods optional

Those arguments aren't required for most common use cases,
so making them optional should help with code readability.
This commit is contained in:
Hugo Locurcio
2019-12-07 01:05:11 +01:00
parent ff58030ed6
commit fe06966181
3 changed files with 7 additions and 7 deletions

View File

@ -55,9 +55,9 @@ static void _pad(FileAccess *p_file, int p_bytes) {
void PCKPacker::_bind_methods() {
ClassDB::bind_method(D_METHOD("pck_start", "pck_name", "alignment"), &PCKPacker::pck_start);
ClassDB::bind_method(D_METHOD("pck_start", "pck_name", "alignment"), &PCKPacker::pck_start, DEFVAL(0));
ClassDB::bind_method(D_METHOD("add_file", "pck_path", "source_path"), &PCKPacker::add_file);
ClassDB::bind_method(D_METHOD("flush", "verbose"), &PCKPacker::flush);
ClassDB::bind_method(D_METHOD("flush", "verbose"), &PCKPacker::flush, DEFVAL(false));
};
Error PCKPacker::pck_start(const String &p_file, int p_alignment) {