[latex3-commits] [l3svn] r6897 - Simplify a conditional
noreply at latex-project.org
noreply at latex-project.org
Sun Feb 12 06:09:14 CET 2017
Author: bruno
Date: 2017-02-12 06:09:14 +0100 (Sun, 12 Feb 2017)
New Revision: 6897
Modified:
trunk/l3packages/xtemplate/xtemplate.dtx
Log:
Simplify a conditional
Modified: trunk/l3packages/xtemplate/xtemplate.dtx
===================================================================
--- trunk/l3packages/xtemplate/xtemplate.dtx 2017-02-12 05:05:46 UTC (rev 6896)
+++ trunk/l3packages/xtemplate/xtemplate.dtx 2017-02-12 05:09:14 UTC (rev 6897)
@@ -1123,21 +1123,17 @@
\cs_new_protected:Npn \@@_declare_object_type:nn #1#2
{
\int_set:Nn \l_@@_tmp_int {#2}
- \bool_if:nTF
+ \int_compare:nTF { \c_zero <= \l_@@_tmp_int <= \c_nine }
{
- \int_compare_p:nNn {#2} > \c_nine ||
- \int_compare_p:nNn {#2} < \c_zero
+ \msg_info:nnxx { xtemplate } { declare-object-type }
+ {#1} { \exp_not:V \l_@@_tmp_int }
+ \prop_gput:NnV \g_@@_object_type_prop {#1}
+ \l_@@_tmp_int
}
{
\msg_error:nnxx { xtemplate } { bad-number-of-arguments }
{#1} { \exp_not:V \l_@@_tmp_int }
}
- {
- \msg_info:nnxx { xtemplate } { declare-object-type }
- {#1} {#2}
- \prop_gput:NnV \g_@@_object_type_prop {#1}
- \l_@@_tmp_int
- }
}
% \end{macrocode}
% \end{macro}
More information about the latex3-commits
mailing list