commit 0a72bab13ef1b1cde1622b31dc303d5b39bf22b2
parent ec4f6344634a00a39bdb616fdc880b316580988e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 28 Jan 2026 15:46:07 +0100
Change the value of SHTR_MAX_MOLECULES_COUNT
Set it to the number of molecules plus 1, so as to handle the zero
molecule identifier. This corresponds to the identifier of the first
molecule, since in the HITRAN format, molecule identifiers start at 1
and not 0.
Even if the constant is no longer the actual number of molecules, its
value simplifies its use. For example, there is no longer any need to
worry about the correspondence between the molecule index and its index
in an array whose size will be defined by this constant. In any case,
the effort is much less than if the user had to perform the conversion
themselves. The only thing to pay attention to is the identifier of the
null molecule.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shtr.h b/src/shtr.h
@@ -59,7 +59,7 @@ enum shtr_molecule_id {
SHTR_COCl2, SHTR_SO, SHTR_CH3F, SHTR_GeH4, SHTR_CS2, SHTR_CH3I,
SHTR_NF3,
- SHTR_MAX_MOLECULES_COUNT = SHTR_NF3
+ SHTR_MAX_MOLECULES_COUNT
};
/* Table that associates the molecule ID with its name */