Fixed formatting
This commit is contained in:
@@ -569,7 +569,6 @@ template <typename C, typename D> void generator<C, D>::init_env()
|
||||
auto element_opt = m_model.get_with_namespace(
|
||||
args[0]->get<std::string>(), m_config.using_namespace());
|
||||
|
||||
|
||||
if (!element_opt.has_value())
|
||||
throw clanguml::error::uml_alias_missing(
|
||||
args[0]->get<std::string>());
|
||||
|
||||
@@ -140,7 +140,8 @@ diagram::files() const
|
||||
}
|
||||
|
||||
common::optional_ref<clanguml::common::model::diagram_element>
|
||||
diagram::get_with_namespace(const std::string &name, const common::model::namespace_ &ns) const
|
||||
diagram::get_with_namespace(
|
||||
const std::string &name, const common::model::namespace_ &ns) const
|
||||
{
|
||||
// Convert to preferred OS path
|
||||
std::filesystem::path namePath{name};
|
||||
|
||||
@@ -60,7 +60,8 @@ public:
|
||||
const common::reference_vector<common::model::source_file> &files() const;
|
||||
|
||||
common::optional_ref<clanguml::common::model::diagram_element>
|
||||
get_with_namespace(const std::string &name, const common::model::namespace_ &ns) const override;
|
||||
get_with_namespace(const std::string &name,
|
||||
const common::model::namespace_ &ns) const override;
|
||||
|
||||
inja::json context() const override;
|
||||
|
||||
|
||||
@@ -303,20 +303,20 @@ std::size_t hash_seed(std::size_t seed)
|
||||
return kSeedStart + (seed << kSeedShiftFirst) + (seed >> kSeedShiftSecond);
|
||||
}
|
||||
|
||||
std::string path_to_url(const std::filesystem::path& p) {
|
||||
std::string path_to_url(const std::filesystem::path &p)
|
||||
{
|
||||
std::vector<std::string> path_tokens;
|
||||
auto it = p.begin();
|
||||
if(p.has_root_directory())
|
||||
if (p.has_root_directory())
|
||||
it++;
|
||||
|
||||
for(; it != p.end(); it++)
|
||||
for (; it != p.end(); it++)
|
||||
path_tokens.push_back(it->string());
|
||||
|
||||
if(p.has_root_directory())
|
||||
if (p.has_root_directory())
|
||||
return fmt::format("/{}", fmt::join(path_tokens, "/"));
|
||||
else
|
||||
return fmt::format("{}", fmt::join(path_tokens, "/"));
|
||||
|
||||
}
|
||||
|
||||
} // namespace clanguml::util
|
||||
|
||||
@@ -257,6 +257,6 @@ std::size_t hash_seed(std::size_t seed);
|
||||
* @param p Path to convert
|
||||
* @return String representation of the path in URL format
|
||||
*/
|
||||
std::string path_to_url(const std::filesystem::path& p);
|
||||
std::string path_to_url(const std::filesystem::path &p);
|
||||
|
||||
} // namespace clanguml::util
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "common/model/namespace.h"
|
||||
|
||||
|
||||
TEST_CASE("Test namespace_", "[unit-test]")
|
||||
{
|
||||
using clanguml::common::model::namespace_;
|
||||
|
||||
Reference in New Issue
Block a user