mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
NodeResolver: Fix some comments and use const references for params
This commit is contained in:
parent
cf8213ea82
commit
2c9bbe2736
@ -1285,8 +1285,8 @@ NodeResolver::~NodeResolver()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int NodeResolver::addNode(std::string n_wanted, std::string n_alt,
|
int NodeResolver::addNode(const std::string &n_wanted, const std::string &n_alt,
|
||||||
content_t c_fallback, content_t *content)
|
content_t c_fallback, content_t *content)
|
||||||
{
|
{
|
||||||
if (m_is_node_registration_complete) {
|
if (m_is_node_registration_complete) {
|
||||||
if (m_ndef->getId(n_wanted, *content))
|
if (m_ndef->getId(n_wanted, *content))
|
||||||
@ -1312,8 +1312,8 @@ int NodeResolver::addNode(std::string n_wanted, std::string n_alt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int NodeResolver::addNodeList(const char *nodename,
|
int NodeResolver::addNodeList(const std::string &nodename,
|
||||||
std::vector<content_t> *content_vec)
|
std::vector<content_t> *content_vec)
|
||||||
{
|
{
|
||||||
if (m_is_node_registration_complete) {
|
if (m_is_node_registration_complete) {
|
||||||
std::set<content_t> idset;
|
std::set<content_t> idset;
|
||||||
@ -1326,7 +1326,7 @@ int NodeResolver::addNodeList(const char *nodename,
|
|||||||
return idset.size() ? NR_STATUS_SUCCESS : NR_STATUS_FAILURE;
|
return idset.size() ? NR_STATUS_SUCCESS : NR_STATUS_FAILURE;
|
||||||
} else {
|
} else {
|
||||||
m_pending_content_vecs.push_back(
|
m_pending_content_vecs.push_back(
|
||||||
std::make_pair(std::string(nodename), content_vec));
|
std::make_pair(nodename, content_vec));
|
||||||
return NR_STATUS_PENDING;
|
return NR_STATUS_PENDING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,7 @@ public:
|
|||||||
node name resolution.
|
node name resolution.
|
||||||
@return Status of node resolution request.
|
@return Status of node resolution request.
|
||||||
*/
|
*/
|
||||||
int addNode(std::string n_wanted, std::string n_alt,
|
int addNode(const std::string &n_wanted, const std::string &n_alt,
|
||||||
content_t c_fallback, content_t *content);
|
content_t c_fallback, content_t *content);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -358,11 +358,12 @@ public:
|
|||||||
|
|
||||||
@return Status of node resolution request.
|
@return Status of node resolution request.
|
||||||
*/
|
*/
|
||||||
int addNodeList(const char *nodename, std::vector<content_t> *content_vec);
|
int addNodeList(const std::string &nodename,
|
||||||
|
std::vector<content_t> *content_vec);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Removes all pending requests from the resolution queue to be satisfied
|
Removes all pending requests from the resolution queue with the output
|
||||||
to content.
|
address of 'content'.
|
||||||
|
|
||||||
@param content Location of the content ID for the request being
|
@param content Location of the content ID for the request being
|
||||||
cancelled.
|
cancelled.
|
||||||
@ -371,8 +372,8 @@ public:
|
|||||||
bool cancelNode(content_t *content);
|
bool cancelNode(content_t *content);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Removes all pending requests from the resolution queue to be satisfied
|
Removes all pending requests from the resolution queue with the output
|
||||||
to content_vec.
|
address of 'content_vec'.
|
||||||
|
|
||||||
@param content_vec Location of the content ID vector for requests being
|
@param content_vec Location of the content ID vector for requests being
|
||||||
cancelled.
|
cancelled.
|
||||||
|
Loading…
Reference in New Issue
Block a user