Cleanup: spelling, use C comments
This commit is contained in:
parent
b99d6e1bed
commit
1e749d0602
@ -26,8 +26,8 @@ static std::string messages_path;
|
||||
static std::string default_domain;
|
||||
static std::string locale_str;
|
||||
|
||||
/* Note: We cannot use short stuff like boost::locale::gettext, because those return
|
||||
* std::basic_string objects, which c_ptr()-returned char* is no more valid
|
||||
/* NOTE: We cannot use short stuff like `boost::locale::gettext`, because those return
|
||||
* `std::basic_string` objects, which c_ptr()-returned char* is no more valid
|
||||
* once deleted (which happens as soons they are out of scope of this func). */
|
||||
typedef boost::locale::message_format<char> char_message_facet;
|
||||
static std::locale locale_global;
|
||||
@ -63,7 +63,7 @@ static void bl_locale_global_cache()
|
||||
|
||||
void bl_locale_init(const char *_messages_path, const char *_default_domain)
|
||||
{
|
||||
// Avoid using ICU backend, we do not need its power and it's rather heavy!
|
||||
/* Avoid using ICU backend, we do not need its power and it's rather heavy! */
|
||||
boost::locale::localization_backend_manager lman =
|
||||
boost::locale::localization_backend_manager::global();
|
||||
#if defined(_WIN32)
|
||||
@ -81,7 +81,7 @@ void bl_locale_set(const char *locale)
|
||||
{
|
||||
boost::locale::generator gen;
|
||||
std::locale _locale;
|
||||
// Specify location of dictionaries.
|
||||
/* Specify location of dictionaries. */
|
||||
gen.add_messages_path(messages_path);
|
||||
gen.add_messages_domain(default_domain);
|
||||
// gen.set_default_messages_domain(default_domain);
|
||||
@ -99,12 +99,12 @@ void bl_locale_set(const char *locale)
|
||||
#endif
|
||||
}
|
||||
std::locale::global(_locale);
|
||||
// Note: boost always uses "C" LC_NUMERIC by default!
|
||||
/* NOTE: boost always uses "C" LC_NUMERIC by default! */
|
||||
|
||||
bl_locale_global_cache();
|
||||
|
||||
// Generate the locale string
|
||||
// (useful to know which locale we are actually using in case of "default" one).
|
||||
/* Generate the locale string
|
||||
* (useful to know which locale we are actually using in case of "default" one). */
|
||||
#define LOCALE_INFO std::use_facet<boost::locale::info>(_locale)
|
||||
|
||||
locale_str = LOCALE_INFO.language();
|
||||
@ -117,10 +117,9 @@ void bl_locale_set(const char *locale)
|
||||
|
||||
#undef LOCALE_INFO
|
||||
}
|
||||
// Extra catch on `std::runtime_error` is needed for macOS/Clang as it seems that exceptions
|
||||
// like `boost::locale::conv::conversion_error` (which inherit from `std::runtime_error`) are
|
||||
// not caught by their ancestor `std::exception`. See
|
||||
// https://developer.blender.org/T88877#1177108 .
|
||||
/* Extra catch on `std::runtime_error` is needed for macOS/Clang as it seems that exceptions
|
||||
* like `boost::locale::conv::conversion_error` (which inherit from `std::runtime_error`) are
|
||||
* not caught by their ancestor `std::exception`. See T88877#1177108 */
|
||||
catch (std::runtime_error const &e) {
|
||||
std::cout << "bl_locale_set(" << locale << "): " << e.what() << " \n";
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ Array<float> Spline::sample_uniform_index_factors(const int samples_size) const
|
||||
prev_length = length;
|
||||
}
|
||||
|
||||
/* Zero lengths or float innacuracies can cause invalid values, or simply
|
||||
/* Zero lengths or float inaccuracies can cause invalid values, or simply
|
||||
* skip some, so set the values that weren't completed in the main loop. */
|
||||
for (const int i : IndexRange(i_sample, samples_size - i_sample)) {
|
||||
samples[i] = float(samples_size);
|
||||
|
@ -465,7 +465,7 @@ static void OVERLAY_cache_populate(void *vedata, Object *ob)
|
||||
break;
|
||||
case OB_LATTICE: {
|
||||
/* Unlike the other types above, lattices actually have a bounding box defined, so hide the
|
||||
* lattice wires if only the boundingbox is requested. */
|
||||
* lattice wires if only the bounding-box is requested. */
|
||||
if (ob->dt > OB_BOUNDBOX) {
|
||||
OVERLAY_lattice_cache_populate(vedata, ob);
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ class NodeTreeRef : NonCopyable, NonMovable {
|
||||
struct ToposortResult {
|
||||
Vector<const NodeRef *> sorted_nodes;
|
||||
/**
|
||||
* There can't be a correct topologycal sort of the nodes when there is a cycle. The nodes will
|
||||
* There can't be a correct topological sort of the nodes when there is a cycle. The nodes will
|
||||
* still be sorted to some degree. The caller has to decide whether it can handle non-perfect
|
||||
* sorts or not.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user