From 9906d4f8c8cc52cc4f9399ea45e4d9f2da5c1fd3 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Mon, 6 Nov 2023 18:54:43 +0100 Subject: [PATCH] Minor corrections --- src/common/database.c | 10 +++++----- src/common/math.h | 4 ++-- src/dtgtk/culling.c | 4 ++-- src/imageio/imageio.c | 2 +- src/iop/profile_gamma.c | 2 +- src/iop/rawprepare.c | 2 +- src/iop/useless.c | 4 ++-- src/libs/snapshots.c | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/common/database.c b/src/common/database.c index fb3105972cb0..3ff685f120a6 100644 --- a/src/common/database.c +++ b/src/common/database.c @@ -1292,7 +1292,7 @@ static int _upgrade_library_schema_step(dt_database_t *db, int version) iop_order_list = g_list_delete_link(iop_order_list, s); } - // skip all multipe instances + // skip all multiple instances n = e; do { @@ -3095,7 +3095,7 @@ static void _create_library_schema(dt_database_t *db) " END", NULL, NULL, NULL); - // Finaly some views to ease walking the data + // Finally some views to ease walking the data // NOTE: datetime_taken is in nano-second since "0001-01-01 00:00:00" sqlite3_exec @@ -3873,7 +3873,7 @@ dt_database_t *dt_database_init(const char *alternative, const gboolean load_dat goto error; } - // upgrade was successfull, time for some housekeeping + // upgrade was successful, time for some housekeeping sqlite3_exec(db->handle, "VACUUM data", NULL, NULL, NULL); sqlite3_exec(db->handle, "ANALYZE data", NULL, NULL, NULL); @@ -4056,7 +4056,7 @@ dt_database_t *dt_database_init(const char *alternative, const gboolean load_dat goto error; } - // upgrade was successfull, time for some housekeeping + // upgrade was successful, time for some housekeeping sqlite3_exec(db->handle, "VACUUM main", NULL, NULL, NULL); sqlite3_exec(db->handle, "ANALYZE main", NULL, NULL, NULL); } @@ -4431,7 +4431,7 @@ void dt_database_perform_maintenance(const struct dt_database_t *db) if(calc_pre_size == 0) { dt_print(DT_DEBUG_SQL, - "[db maintenance] maintenance deemed unnecesary, performing only analyze.\n"); + "[db maintenance] maintenance deemed unnecessary, performing only analyze.\n"); DT_DEBUG_SQLITE3_EXEC(db->handle, "ANALYZE data", NULL, NULL, &err); ERRCHECK DT_DEBUG_SQLITE3_EXEC(db->handle, "ANALYZE main", NULL, NULL, &err); diff --git a/src/common/math.h b/src/common/math.h index 39ee24471185..dd2cdbfa7cae 100644 --- a/src/common/math.h +++ b/src/common/math.h @@ -28,7 +28,7 @@ // select speed vs accuracy tradeoff // supported values for EXP_POLY_DEGREE are 4 and 5 #define EXP_POLY_DEGREE 4 -// supported vlaues for LOG_POLY_DEGREE are 5 and 6 +// supported values for LOG_POLY_DEGREE are 5 and 6 #define LOG_POLY_DEGREE 5 // work around missing standard math.h symbols @@ -554,7 +554,7 @@ static inline void dt_vector_exp(const dt_aligned_pixel_t x, dt_aligned_pixel_t // See http://www.devmaster.net/forums/showthread.php?p=43580 for the original static inline void dt_vector_exp2(const dt_aligned_pixel_t input, dt_aligned_pixel_t res) { - // clamp the exponent to the suported range + // clamp the exponent to the supported range static const dt_aligned_pixel_t lower_bound = { -126.99999f, -126.99999f, -126.99999f, -126.99999f }; static const dt_aligned_pixel_t upper_bound = { 129.00000f, 129.00000f, 129.00000f, 129.00000f }; static const dt_aligned_pixel_t v_half = { 0.5f, 0.5f, 0.5f, 0.5f }; diff --git a/src/dtgtk/culling.c b/src/dtgtk/culling.c index 13641ad07dbd..a74dc21ede70 100644 --- a/src/dtgtk/culling.c +++ b/src/dtgtk/culling.c @@ -1408,7 +1408,7 @@ static gboolean _thumbs_compute_positions(dt_culling_t *table) // if all images have similar heigths, they will not be stacked and placed in separate slots. // Note: Stacking only make sense for images in the same row as the portrait image. - // The algorithm does not check for this so unneccessary stacking can occur. + // The algorithm does not check for this so unnecessary stacking can occur. GList *slots = NULL; int max_slot_heigth = 0; @@ -1587,7 +1587,7 @@ static gboolean _thumbs_compute_positions(dt_culling_t *table) // don't include bottom spacing in height calculation slot_total_heigth -= spacing; - // if slot is about to be placed outside of allocated horizonal space, place the slot in a new row + // if slot is about to be placed outside of allocated horizontal space, place the slot in a new row // we allow for 20% thumbnail width tolerance to account for the influence of images with mixed aspect ratios in the math gboolean create_new_row = FALSE; diff --git a/src/imageio/imageio.c b/src/imageio/imageio.c index b5cf96e515c1..ac729e629148 100644 --- a/src/imageio/imageio.c +++ b/src/imageio/imageio.c @@ -1149,7 +1149,7 @@ int dt_imageio_export_with_flags(const dt_imgid_t imgid, // Check if all the metadata export flags are set for AVIF/EXR/JPEG XL/XCF (opt-in) // - // TODO: this is a workround as these formats do not support fine + // TODO: this is a workaround as these formats do not support fine // grained metadata control through dt_exif_xmp_attach_export() // below due to lack of exiv2 write support // diff --git a/src/iop/profile_gamma.c b/src/iop/profile_gamma.c index 75ff8c4f96c6..dfd5a1e446b7 100644 --- a/src/iop/profile_gamma.c +++ b/src/iop/profile_gamma.c @@ -667,7 +667,7 @@ void gui_init(dt_iop_module_t *self) g->security_factor = dt_bauhaus_slider_from_params(self, "security_factor"); dt_bauhaus_slider_set_format(g->security_factor, "%"); - gtk_widget_set_tooltip_text(g->security_factor, _("enlarge or shrink the computed dynamic range\nthis is useful when noise perturbates the measurements")); + gtk_widget_set_tooltip_text(g->security_factor, _("enlarge or shrink the computed dynamic range\nthis is useful when noise perturbs the measurements")); g->auto_button = dt_color_picker_new(self, DT_COLOR_PICKER_AREA, dt_bauhaus_combobox_new(self)); dt_bauhaus_widget_set_label(g->auto_button, NULL, N_("auto tune levels")); diff --git a/src/iop/rawprepare.c b/src/iop/rawprepare.c index d15dd2bf957a..2e760b032608 100644 --- a/src/iop/rawprepare.c +++ b/src/iop/rawprepare.c @@ -685,7 +685,7 @@ static gboolean _check_gain_maps(dt_iop_module_t *self, dt_dng_gain_map_t **gain if(g_list_length(image->dng_gain_maps) != 4) return FALSE; - // FIXME checks for witdh / height might be wrong + // FIXME checks for width / height might be wrong for(int i = 0; i < 4; i++) { // check that each GainMap applies to one filter of a Bayer image, diff --git a/src/iop/useless.c b/src/iop/useless.c index eca08be608a3..c6723b383d59 100644 --- a/src/iop/useless.c +++ b/src/iop/useless.c @@ -32,7 +32,7 @@ // Silence the compiler during dev of new module as we often // need to have temporary unfinished code that will hurt the // compiler. -// THIS MUST be REMOVED before submiting a PR. +// THIS MUST be REMOVED before submitting a PR. #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-function" @@ -204,7 +204,7 @@ int legacy_params(dt_iop_module_t *self, // do migration from 2 to 3 (one step at a time, this legacy_params // update is incremental and will be done as many time as needed to - // bring the parameters to the lastes version of the module. + // bring the parameters to the latest version of the module. if(old_version == 2) { diff --git a/src/libs/snapshots.c b/src/libs/snapshots.c index d9f0a3ccda94..c33d367afb27 100644 --- a/src/libs/snapshots.c +++ b/src/libs/snapshots.c @@ -635,7 +635,7 @@ static void _remove_snapshot_entry(dt_lib_module_t *self, const uint32_t index) memcpy(&d->snapshot[k], &d->snapshot[k+1], sizeof(dt_lib_snapshot_t)); } - // And finaly clear last entry + // And finally clear last entry _clear_snapshot_entry(&d->snapshot[MAX_SNAPSHOT-1]); // And dedup widgets by initializing the last entry _init_snapshot_entry(self, &d->snapshot[MAX_SNAPSHOT-1]);