MSVC is picky about vector access
This commit is contained in:

committed by
Michael Davidsaver

parent
c7a54de469
commit
54a882d844
@ -278,7 +278,7 @@ struct DBManyLock
|
||||
dbLocker *plock;
|
||||
DBManyLock() :plock(NULL) {}
|
||||
DBManyLock(const std::vector<dbCommon*>& recs, unsigned flags=0)
|
||||
:plock(dbLockerAlloc((dbCommon**)&recs[0], recs.size(), flags))
|
||||
:plock(dbLockerAlloc( (recs.size() > 0 ? (dbCommon**)&recs[0] : NULL), recs.size(), flags))
|
||||
{
|
||||
if(!plock) throw std::invalid_argument("Failed to create locker");
|
||||
}
|
||||
|
Reference in New Issue
Block a user