X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fbatch.cpp;h=ebd7b049125137d2fb89f9d40255d44a139f5b8c;hb=6955c16bb123f3b795186c99442dc4d92be0ebc9;hp=51746b37178a6345ca3e3ff1982a6bcdf7333e88;hpb=715672cf2c64dab0744db676fdee255ee3a4cef7;p=libs%2Fgl.git diff --git a/source/core/batch.cpp b/source/core/batch.cpp index 51746b37..ebd7b049 100644 --- a/source/core/batch.cpp +++ b/source/core/batch.cpp @@ -65,6 +65,8 @@ Batch::~Batch() void Batch::set_index_type(DataType t) { + if(t==index_type) + return; if(t!=UNSIGNED_SHORT && t!=UNSIGNED_INT) throw invalid_argument("Batch::set_data_type"); if(t==UNSIGNED_SHORT && max_index>0xFFFE)