Indent every scope and put opening braces on the signature line
Namespace and extern "C" bodies are indented a level, so nesting is visible from the indentation rather than only from the braces. Opening braces stay on the line that opens the scope, including function definitions, which previously carried theirs on a line of their own.
This commit is contained in:
@@ -63,23 +63,21 @@ struct dpm_ctx {
|
||||
};
|
||||
|
||||
namespace dpm_core {
|
||||
/**
|
||||
* @brief Records a failure reason on the context
|
||||
*
|
||||
* @param ctx The libdpm-core context; NULL is a no-op
|
||||
* @param msg The failure description
|
||||
*/
|
||||
void set_error(dpm_ctx* ctx, const std::string& msg);
|
||||
|
||||
/**
|
||||
* @brief Records a failure reason on the context
|
||||
*
|
||||
* @param ctx The libdpm-core context; NULL is a no-op
|
||||
* @param msg The failure description
|
||||
*/
|
||||
void set_error(dpm_ctx* ctx, const std::string& msg);
|
||||
|
||||
/**
|
||||
* @brief Loads all configuration files into the context
|
||||
*
|
||||
* Parses every .conf file in the context's configuration directory
|
||||
* into the context's configuration store.
|
||||
*
|
||||
* @param ctx The libdpm-core context
|
||||
*/
|
||||
void load_config_dir(dpm_ctx* ctx);
|
||||
|
||||
/**
|
||||
* @brief Loads all configuration files into the context
|
||||
*
|
||||
* Parses every .conf file in the context's configuration directory
|
||||
* into the context's configuration store.
|
||||
*
|
||||
* @param ctx The libdpm-core context
|
||||
*/
|
||||
void load_config_dir(dpm_ctx* ctx);
|
||||
} // namespace dpm_core
|
||||
|
||||
@@ -65,20 +65,18 @@ struct dpm_cursor {
|
||||
void dpm_internal_unload(void* handle);
|
||||
|
||||
namespace dpm_core {
|
||||
|
||||
/**
|
||||
* @brief Runs the full load-time validation sequence against a module
|
||||
*
|
||||
* Loads the named module's .so from the context's module path and
|
||||
* verifies the complete contract.
|
||||
*
|
||||
* @param ctx The libdpm-core context
|
||||
* @param name The module name
|
||||
* @param reason Receives the refusal reason on failure
|
||||
* @return The validated module (caller owns), or nullptr on failure
|
||||
*/
|
||||
std::unique_ptr<dpm_module> validate_and_load(dpm_ctx* ctx,
|
||||
const std::string& name,
|
||||
std::string& reason);
|
||||
|
||||
/**
|
||||
* @brief Runs the full load-time validation sequence against a module
|
||||
*
|
||||
* Loads the named module's .so from the context's module path and
|
||||
* verifies the complete contract.
|
||||
*
|
||||
* @param ctx The libdpm-core context
|
||||
* @param name The module name
|
||||
* @param reason Receives the refusal reason on failure
|
||||
* @return The validated module (caller owns), or nullptr on failure
|
||||
*/
|
||||
std::unique_ptr<dpm_module> validate_and_load(dpm_ctx* ctx,
|
||||
const std::string& name,
|
||||
std::string& reason);
|
||||
} // namespace dpm_core
|
||||
|
||||
@@ -23,14 +23,12 @@
|
||||
#pragma once
|
||||
|
||||
namespace dpm_core {
|
||||
|
||||
/**
|
||||
* @brief Parses a strict X.Y.Z version string
|
||||
*
|
||||
* @param s The version string
|
||||
* @param out Receives the three parsed components
|
||||
* @return true on success; false on any malformation
|
||||
*/
|
||||
bool parse_version(const char* s, long out[3]);
|
||||
|
||||
/**
|
||||
* @brief Parses a strict X.Y.Z version string
|
||||
*
|
||||
* @param s The version string
|
||||
* @param out Receives the three parsed components
|
||||
* @return true on success; false on any malformation
|
||||
*/
|
||||
bool parse_version(const char* s, long out[3]);
|
||||
} // namespace dpm_core
|
||||
|
||||
Reference in New Issue
Block a user