Skip to content

Cleanup src/lib/libopenal.js. NFC - #27425

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:openal_refactor
Jul 29, 2026
Merged

Cleanup src/lib/libopenal.js. NFC#27425
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:openal_refactor

Conversation

@sbc100

@sbc100 sbc100 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator
  • Use for .. of in a few more places.
  • Use truthiness rather than !== 0 and === 0

@sbc100
sbc100 requested a review from kripken July 28, 2026 04:10
@sbc100
sbc100 force-pushed the openal_refactor branch from da26ca6 to 493e2ed Compare July 28, 2026 16:24
@sbc100
sbc100 requested a review from brendandahl July 28, 2026 16:25
Comment thread src/lib/libopenal.js Outdated
@sbc100
sbc100 force-pushed the openal_refactor branch from 493e2ed to 85f4926 Compare July 28, 2026 21:06
Comment thread src/lib/libopenal.js Outdated
@sbc100
sbc100 force-pushed the openal_refactor branch from 85f4926 to f36fb6b Compare July 28, 2026 22:23
@sbc100
sbc100 requested a review from kripken July 29, 2026 00:48
@sbc100
sbc100 enabled auto-merge (squash) July 29, 2026 03:30
@sbc100
sbc100 force-pushed the openal_refactor branch from f36fb6b to e90d8bd Compare July 29, 2026 03:53
Comment thread src/lib/libopenal.js Outdated
- Use `for .. of` in a few more places.
- Remove duplication in setSourceParam(AL_BUFFER)
@sbc100
sbc100 force-pushed the openal_refactor branch from e90d8bd to de61f5f Compare July 29, 2026 19:23
@sbc100 sbc100 changed the title Refactor src/lib/libopenal.js. NFC Cleanup src/lib/libopenal.js. NFC Jul 29, 2026
Comment thread src/lib/libopenal.js
@sbc100
sbc100 merged commit 2768c9f into emscripten-core:main Jul 29, 2026
39 of 41 checks passed
@sbc100
sbc100 deleted the openal_refactor branch July 29, 2026 20:21
sbc100 added a commit to sbc100/emscripten that referenced this pull request Jul 29, 2026
Similar to emscripten-core#27425 but applied to the whole JS library

- Replace explicit zero checks (`=== 0`, `!== 0`) with implicit
  truthy/falsy checks (`!x`, `x`).
- Replace `.length === 0` checks with `!arr.length`.
- Simplify null/undefined/zero check in `src/lib/libccall.js` to
  `if (str)`.
- Use `for (var byte of data)` loop in `src/lib/libbrowser.js`.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Jul 30, 2026
Similar to emscripten-core#27425 but applied to the whole JS library

- Replace explicit zero checks (`=== 0`, `!== 0`) with implicit
  truthy/falsy checks (`!x`, `x`).
- Replace `.length === 0` checks with `!arr.length`.
- Simplify null/undefined/zero check in `src/lib/libccall.js` to
  `if (str)`.
- Use `for (var byte of data)` loop in `src/lib/libbrowser.js`.
sbc100 added a commit that referenced this pull request Jul 30, 2026
Similar to #27425 but applied to the whole JS library

- Replace explicit zero checks (`=== 0`, `!== 0`) with implicit
truthy/falsy checks (`!x`, `x`).
- Replace `.length === 0` checks with `!arr.length`.
- Simplify null/undefined/zero check in `src/lib/libccall.js` to `if
(str)`.
- Use `for (var byte of data)` loop in `src/lib/libbrowser.js`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants