Cleanup: spelling

Also correct wrapped lines of example code in threads.cc.
master
Campbell Barton 4 years ago
parent 379d5d7349
commit 267b8e1a5c

@ -91,7 +91,7 @@ class GHOST_DropTargetX11 {
/**
* Fully decode file URL (i.e. converts "file:///a%20b/test" to "/a b/test")
* \param fileUrl - file path URL to be fully decoded
* \return decoded file path (resutl should be free-d)
* \return decoded file path (result should be free-d)
*/
char *FileUrlDecode(char *fileUrl);

@ -1249,7 +1249,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
[bitmapImage setSize:imgSize];
/* Convert the image in a RGBA 32bit format */
/* As Core Graphics does not support contextes with non premutliplied alpha,
/* As Core Graphics does not support contexts with non premutliplied alpha,
we need to get alpha key values in a separate batch */
/* First get RGB values w/o Alpha to avoid pre-multiplication,

@ -1043,7 +1043,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
* is unmodified (or anyone swapping the keys with xmodmap).
*
* - XLookupKeysym seems to always use first defined keymap (see T47228), which generates
* keycodes unusable by ghost_key_from_keysym for non-latin-compatible keymaps.
* keycodes unusable by ghost_key_from_keysym for non-Latin-compatible keymaps.
*
* To address this, we:
*

@ -215,7 +215,7 @@ struct DerivedMesh {
void *(*getPolyDataArray)(DerivedMesh *dm, int type);
/** Retrieves the base CustomData structures for
* verts/edges/tessfaces/loops/facdes*/
* verts/edges/tessfaces/loops/faces. */
CustomData *(*getVertDataLayout)(DerivedMesh *dm);
CustomData *(*getEdgeDataLayout)(DerivedMesh *dm);
CustomData *(*getTessFaceDataLayout)(DerivedMesh *dm);

@ -200,7 +200,7 @@ void BKE_object_where_is_calc_time(struct Depsgraph *depsgraph,
float ctime);
void BKE_object_where_is_calc_mat4(struct Object *ob, float r_obmat[4][4]);
/* possibly belong in own moduke? */
/* Possibly belong in own module? */
struct BoundBox *BKE_boundbox_alloc_unit(void);
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], const float max[3]);
void BKE_boundbox_calc_center_aabb(const struct BoundBox *bb, float r_cent[3]);

@ -224,7 +224,7 @@ void BLI_listbase_swaplinks(ListBase *listbase, void *vlinka, void *vlinkb)
/**
* Swaps \a vlinka and \a vlinkb from their respective lists.
* Assumes they are both already in their lista!
* Assumes they are both already in their \a listbasea!
*/
void BLI_listbases_swaplinks(ListBase *listbasea, ListBase *listbaseb, void *vlinka, void *vlinkb)
{

@ -2425,7 +2425,7 @@ static IMesh gwn_boolean(const IMesh &tm,
int other_shape = 1 - shape;
/* The point_is_inside_shape function has to approximate if the other
* shape is not PWN. For most operations, even a hint of being inside
* givs good results, but when shape is the cutter in a Difference
* gives good results, but when shape is the cutter in a Difference
* operation, we want to be pretty sure that the point is inside other_shape.
* E.g., T75827.
*/

@ -65,49 +65,56 @@ extern pthread_key_t gomp_tls_key;
static void *thread_tls_data;
#endif
/* ********** basic thread control API ************
/**
* Basic Thread Control API
* ========================
*
* Many thread cases have an X amount of jobs, and only an Y amount of
* threads are useful (typically amount of cpus)
* threads are useful (typically amount of CPU's)
*
* This code can be used to start a maximum amount of 'thread slots', which
* then can be filled in a loop with an idle timer.
*
* A sample loop can look like this (pseudo c);
*
* ListBase lb;
* int maxthreads = 2;
* int cont = 1;
* \code{.c}
*
* BLI_threadpool_init(&lb, do_something_func, maxthreads);
* ListBase lb;
* int max_threads = 2;
* int cont = 1;
*
* while (cont) {
* if (BLI_available_threads(&lb) && !(escape loop event)) {
* // get new job (data pointer)
* // tag job 'processed
* BLI_threadpool_insert(&lb, job);
* }
* else PIL_sleep_ms(50);
* BLI_threadpool_init(&lb, do_something_func, max_threads);
*
* while (cont) {
* if (BLI_available_threads(&lb) && !(escape loop event)) {
* // get new job (data pointer)
* // tag job 'processed
* BLI_threadpool_insert(&lb, job);
* }
* else PIL_sleep_ms(50);
*
* // find if a job is ready, this the do_something_func() should write in job somewhere
* cont = 0;
* for (go over all jobs)
* if (job is ready) {
* if (job was not removed) {
* BLI_threadpool_remove(&lb, job); * }
* }
* else cont = 1; * }
* // conditions to exit loop
* if (if escape loop event) {
* if (BLI_available_threadslots(&lb) == maxthreads) {
* break;
* }
* // Find if a job is ready, this the do_something_func() should write in job somewhere.
* cont = 0;
* for (go over all jobs)
* if (job is ready) {
* if (job was not removed) {
* BLI_threadpool_remove(&lb, job);
* }
* }
* else cont = 1;
* }
* // Conditions to exit loop.
* if (if escape loop event) {
* if (BLI_available_threadslots(&lb) == max_threads) {
* break;
* }
* }
* }
*
* BLI_threadpool_end(&lb);
* BLI_threadpool_end(&lb);
*
************************************************ */
* \endcode
*/
static pthread_mutex_t _image_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _image_draw_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _viewer_lock = PTHREAD_MUTEX_INITIALIZER;

@ -101,7 +101,7 @@ void GPENCIL_render_init(GPENCIL_Data *vedata,
const bool do_clear_z = !pix_z || do_region;
const bool do_clear_col = !pix_col || do_region;
/* FIXME(fclem): we have a precision loss in the depth buffer because of this reupload.
/* FIXME(fclem): we have a precision loss in the depth buffer because of this re-upload.
* Find where it comes from! */
/* In multi view render the textures can be reused. */
if (txl->render_depth_tx && !do_clear_z) {

@ -22,7 +22,7 @@
/**
* DRW Instance Data Manager
* This is a special memory manager that keeps memory blocks ready to send as vbo data in one
* This is a special memory manager that keeps memory blocks ready to send as VBO data in one
* continuous allocation. This way we avoid feeding #GPUBatch each instance data one by one and
* unnecessary memcpy. Since we loose which memory block was used each #DRWShadingGroup we need to
* redistribute them in the same order/size to avoid to realloc each frame. This is why

@ -1756,7 +1756,7 @@ void DRW_view_update(DRWView *view,
const float (*culling_winmat)[4])
{
/* DO NOT UPDATE THE DEFAULT VIEW.
* Create subviews instead, or a copy. */
* Create sub-views instead, or a copy. */
BLI_assert(view != DST.view_default);
BLI_assert(view->parent == NULL);

@ -2735,13 +2735,11 @@ static bool rename_anim_channels(bAnimContext *ac, int channel_index)
/* ok if we can get name property to edit from this channel */
if (acf->name_prop(ale, &ptr, &prop)) {
/* actually showing the rename textfield is done on redraw,
/* Actually showing the rename text-field is done on redraw,
* so here we just store the index of this channel in the
* dopesheet data, which will get utilized when drawing the
* channel...
* dope-sheet data, which will get utilized when drawing the channel.
*
* +1 factor is for backwards compat issues
*/
* +1 factor is for backwards compatibility issues. */
if (ac->ads) {
ac->ads->renameIndex = channel_index + 1;
success = true;

@ -1484,7 +1484,7 @@ void ED_screen_animation_timer(bContext *C, int redraws, int sync, int enable)
screen->animtimer = WM_event_add_timer(wm, win, TIMER0, (1.0 / FPS));
sad->region = CTX_wm_region(C);
/* if startframe is larger than current frame, we put currentframe on startframe.
/* If start-frame is larger than current frame, we put current-frame on start-frame.
* note: first frame then is not drawn! (ton) */
if (PRVRANGEON) {
if (scene->r.psfra > scene->r.cfra) {

@ -123,7 +123,7 @@ GPUTexture **gpu_material_ramp_texture_row_set(GPUMaterial *mat,
float *pixels,
float *row)
{
/* In order to put all the colorbands into one 1D array texture,
/* In order to put all the color-bands into one 1D array texture,
* we need them to be the same size. */
BLI_assert(size == CM_TABLE + 1);
UNUSED_VARS_NDEBUG(size);

@ -403,7 +403,7 @@ static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16])
copy_m4_m4(local_mat, (float(*)[4])values);
}
/* Don't use compat so we get predictable rotation, and do not use parenting either,
/* Don't use compatible so we get predictable rotation, and do not use parenting either,
* because it's a local matrix! */
BKE_object_apply_mat4(ob, local_mat, false, false);
}

Loading…
Cancel
Save