Fix typos, fix some warnings, added more compile options, moved to forgejo CI
This commit is contained in:
parent
3ae1fd15c0
commit
1585b8e4f5
15 changed files with 204 additions and 120 deletions
10
src/base.h
10
src/base.h
|
@ -48,7 +48,7 @@ template <class K, class V>
|
|||
class Cache;
|
||||
|
||||
typedef MDB_txn* TransactionID; /**<\brief I'm going to use transaction pointers as transaction IDs*/
|
||||
typedef uint32_t SizeType; /**<\brief All LMDBAL sizes are uint32_t*/
|
||||
typedef uint32_t SizeType; /**<\brief All LMDBAL sizes are uint32*/
|
||||
|
||||
class Base {
|
||||
friend class StorageCommon;
|
||||
|
@ -135,8 +135,8 @@ LMDBAL::Storage<K, V>* LMDBAL::Base::addStorage(const std::string& storageName,
|
|||
if (opened)
|
||||
throw Opened(name, "add storage " + storageName);
|
||||
|
||||
Storage<K, V>* storage = new Storage<K, V>(this, storageName, duplicates);
|
||||
std::pair<Storages::const_iterator, bool> pair = storages.insert(std::make_pair(storageName, (StorageCommon *)storage));
|
||||
auto storage = new Storage<K, V>(this, storageName, duplicates);
|
||||
std::pair<Storages::const_iterator, bool> pair = storages.emplace(storageName, static_cast<StorageCommon *>(storage));
|
||||
if (!pair.second)
|
||||
throw StorageDuplicate(name, storageName);
|
||||
|
||||
|
@ -163,8 +163,8 @@ LMDBAL::Cache<K, V> * LMDBAL::Base::addCache(const std::string& storageName) {
|
|||
if (opened)
|
||||
throw Opened(name, "add cache " + storageName);
|
||||
|
||||
Cache<K, V>* cache = new Cache<K, V>(this, storageName, false);
|
||||
std::pair<Storages::const_iterator, bool> pair = storages.insert(std::make_pair(storageName, (StorageCommon *)cache));
|
||||
auto cache = new Cache<K, V>(this, storageName, false);
|
||||
std::pair<Storages::const_iterator, bool> pair = storages.emplace(storageName, static_cast<StorageCommon *>(cache));
|
||||
if (!pair.second)
|
||||
throw StorageDuplicate(name, storageName);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue