mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
CA: Globals: Introduce global CAssetsDir gAssetsDir
This commit is contained in:
parent
b1a065e6c3
commit
bd48b5ed7b
3 changed files with 34 additions and 0 deletions
|
|
@ -95,6 +95,7 @@ BITCOIN_CORE_H = \
|
|||
consensus/consensus.h \
|
||||
core_io.h \
|
||||
core_memusage.h \
|
||||
global/common.h \
|
||||
httprpc.h \
|
||||
httpserver.h \
|
||||
indirectmap.h \
|
||||
|
|
@ -307,6 +308,7 @@ libbitcoin_common_a_SOURCES = \
|
|||
compressor.cpp \
|
||||
core_read.cpp \
|
||||
core_write.cpp \
|
||||
global/common.cpp \
|
||||
key.cpp \
|
||||
keystore.cpp \
|
||||
merkleblock.cpp \
|
||||
|
|
|
|||
15
src/global/common.cpp
Normal file
15
src/global/common.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) 2017-2017 The Elements Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "global/common.h"
|
||||
|
||||
#include "assetsdir.h"
|
||||
|
||||
CAssetsDir _gAssetsDir;
|
||||
const CAssetsDir& gAssetsDir = _gAssetsDir;
|
||||
|
||||
void InitGlobalAssetDir(const std::vector<std::string>& assetsToInit)
|
||||
{
|
||||
_gAssetsDir.InitFromStrings(assetsToInit);
|
||||
}
|
||||
17
src/global/common.h
Normal file
17
src/global/common.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) 2017-2017 The Elements Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_GLOBAL_COMMON_H
|
||||
#define BITCOIN_GLOBAL_COMMON_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class CAssetsDir;
|
||||
|
||||
extern const CAssetsDir& gAssetsDir;
|
||||
|
||||
void InitGlobalAssetDir(const std::vector<std::string>& assetsToInit);
|
||||
|
||||
#endif // BITCOIN_GLOBAL_COMMON_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue