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:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user