Skip to content

Commit bfe56c4

Browse files
Remove dead pcsToLstar() left over from L* tone reversal removal
pcsToLstar() was introduced in 30321a7 alongside the InkReversalL feature and was only ever called by buildReversalGraph(). The tone-reversal removal (cf8207f) dropped that caller but left this helper behind as dead code; remove it and drop the now-stale reference to it in pcsToLabFull's comment. No behaviour change. Compiles clean under g++ -Wall -Wextra -Wunused-function. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent cf8207f commit bfe56c4

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

iccviz/IccVizModel.cpp

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -837,24 +837,6 @@ bool isPcsSpace(icColorSpaceSignature s) {
837837
return s == icSigLabData || s == icSigXYZData;
838838
}
839839

840-
// One transform output (internal PCS encoding) → human L*. Returns NaN for an
841-
// unsupported PCS or a non-finite result, which callers drop.
842-
float pcsToLstar(const icFloatNumber* dst, int outCh, icColorSpaceSignature pcs) {
843-
if (outCh < 3) return kNaN;
844-
icFloatNumber v[3] = { dst[0], dst[1], dst[2] };
845-
if (pcs == icSigLabData) {
846-
icLabFromPcs(v); // PCS-encoded Lab → human L*a*b*
847-
return std::isfinite(v[0]) ? static_cast<float>(v[0]) : kNaN;
848-
}
849-
if (pcs == icSigXYZData) {
850-
icXyzFromPcs(v); // PCS-encoded XYZ → human XYZ (D50)
851-
icFloatNumber lab[3] = { 0, 0, 0 };
852-
icXYZtoLab(lab, v, nullptr); // nullptr white → D50 default
853-
return std::isfinite(lab[0]) ? static_cast<float>(lab[0]) : kNaN;
854-
}
855-
return kNaN;
856-
}
857-
858840
// ─────────────────────────────────────────────────────────────────────────────
859841
// Neutral Axis Inking (Kind::NeutralAxisInking)
860842
//
@@ -1152,7 +1134,7 @@ void gamutVolumeParams(int N, int& steps, double& vs, int& dilate) {
11521134

11531135
// ── B2A round-trip helpers ────────────────────────────────────────────────────
11541136
// Internal-PCS-encoded (Lab or XYZ) → human L*a*b*. Returns false for an
1155-
// unsupported PCS. (pcsToLstar above returns only L*; here we need full Lab.)
1137+
// unsupported PCS.
11561138
bool pcsToLabFull(const icFloatNumber* pcs, icColorSpaceSignature sp, icFloatNumber out[3]) {
11571139
icFloatNumber v[3] = { pcs[0], pcs[1], pcs[2] };
11581140
if (sp == icSigLabData) { icLabFromPcs(v); out[0]=v[0]; out[1]=v[1]; out[2]=v[2]; return true; }

0 commit comments

Comments
 (0)