diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-11-13 05:07:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-11-13 05:07:13 +0300 |
commit | 1143bf281afc69b931f7d0eb1daa4b800dcc513d (patch) | |
tree | 38e14b6ef4d15085c65b66755260ec0521e50c3c /intern/ghost | |
parent | acc800d24dccc48364c2d64b035c5c6aca895651 (diff) |
Cleanup: spelling in comments, comment block formatting
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/GHOST_Types.h | 4 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 6 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_XrAction.cpp | 5 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_XrControllerModel.cpp | 14 |
4 files changed, 15 insertions, 14 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 2c8014a08cc..ce0185bc7d0 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -654,8 +654,8 @@ enum { GHOST_kXrContextDebug = (1 << 0), GHOST_kXrContextDebugTime = (1 << 1), # ifdef WIN32 - /* Needed to avoid issues with the SteamVR OpenGL graphics binding (use DirectX fallback - instead). */ + /* Needed to avoid issues with the SteamVR OpenGL graphics binding + * (use DirectX fallback instead). */ GHOST_kXrContextGpuNVIDIA = (1 << 2), # endif }; diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 204bbdaec50..b92c3e73a88 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1245,7 +1245,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType /* Convert the image in a RGBA 32bit format */ /* As Core Graphics does not support contexts with non premutliplied alpha, - we need to get alpha key values in a separate batch */ + * we need to get alpha key values in a separate batch */ /* First get RGB values w/o Alpha to avoid pre-multiplication, * 32bit but last byte is unused */ @@ -1479,8 +1479,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr) CocoaWindow *cocoawindow; /* [event window] returns other windows if mouse-over, that's OSX input standard - however, if mouse exits window(s), the windows become inactive, until you click. - We then fall back to the active window from ghost */ + * however, if mouse exits window(s), the windows become inactive, until you click. + * We then fall back to the active window from ghost. */ window = (GHOST_WindowCocoa *)m_windowManager->getWindowAssociatedWithOSWindow( (void *)[event window]); if (!window) { diff --git a/intern/ghost/intern/GHOST_XrAction.cpp b/intern/ghost/intern/GHOST_XrAction.cpp index 704b1ce9fac..f51f98c9b3d 100644 --- a/intern/ghost/intern/GHOST_XrAction.cpp +++ b/intern/ghost/intern/GHOST_XrAction.cpp @@ -216,8 +216,9 @@ GHOST_XrAction::GHOST_XrAction(XrInstance instance, XrActionCreateInfo action_info{XR_TYPE_ACTION_CREATE_INFO}; strcpy(action_info.actionName, info.name); - strcpy(action_info.localizedActionName, info.name); /* Just use same name for localized. This can - be changed in the future if necessary. */ + + /* Just use same name for localized. This can be changed in the future if necessary. */ + strcpy(action_info.localizedActionName, info.name); switch (info.type) { case GHOST_kXrActionTypeBooleanInput: diff --git a/intern/ghost/intern/GHOST_XrControllerModel.cpp b/intern/ghost/intern/GHOST_XrControllerModel.cpp index ae15bf11aa0..27f92ffe7c5 100644 --- a/intern/ghost/intern/GHOST_XrControllerModel.cpp +++ b/intern/ghost/intern/GHOST_XrControllerModel.cpp @@ -97,8 +97,8 @@ static void read_vertices(const tinygltf::Accessor &accessor, validate_accessor(accessor, buffer_view, buffer, stride, packed_size); /* Resize the vertices vector, if necessary, to include room for the attribute data. - If there are multiple attributes for a primitive, the first one will resize, and the - subsequent will not need to. */ + * If there are multiple attributes for a primitive, the first one will resize, and the + * subsequent will not need to. */ primitive.vertices.resize(accessor.count); /* Copy the attribute value over from the glTF buffer into the appropriate vertex field. */ @@ -147,9 +147,9 @@ static void read_indices(const tinygltf::Accessor &accessor, const tinygltf::Buffer &buffer, GHOST_XrPrimitive &primitive) { - if (buffer_view.target != TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER && - buffer_view.target != 0) { /* Allow 0 (not specified) even though spec doesn't seem to allow - this (BoomBox GLB fails). */ + + /* Allow 0 (not specified) even though spec doesn't seem to allow this (BoomBox GLB fails). */ + if (buffer_view.target != TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER && buffer_view.target != 0) { throw GHOST_XrException( "glTF: Accessor for indices uses bufferview with invalid 'target' type."); } @@ -164,8 +164,8 @@ static void read_indices(const tinygltf::Accessor &accessor, validate_accessor(accessor, buffer_view, buffer, component_size_bytes, component_size_bytes); - if ((accessor.count % 3) != 0) { /* Since only triangles are supported, enforce that the number - of indices is divisible by 3. */ + /* Since only triangles are supported, enforce that the number of indices is divisible by 3. */ + if ((accessor.count % 3) != 0) { throw GHOST_XrException("glTF: Unexpected number of indices for triangle primitive"); } |