replace use of grep in Windows build utility setup with Select-String
This is a built-in function in PowerShell with equivalent functionality for this
purpose. This change is a step towards removing grep as a build dependency on
Windows. Related to #2069.
use isEmpty in preference to checking length against 0 in gvedit
Qt QStrings have two methods, isEmpty and length, analogous to empty and length
on std::string, respectively. Checking isEmpty is equivalent to checking length
against 0, is clearer, and has the potential to be more performant.
Graphviz was part of a closed beta program for Gitlab macOS CI runners.¹ During
the beta period, Graphviz had access to a single macOS VM environment that was
stateful. That is, the effects of any macOS CI task would persist to the next
macOS CI task. To work around this, logic was introduced to manually remove the
Graphviz installed in the macOS CI environment by the prior run.
The Gitlab program will transition into open beta on 2021-05-22, however the
Graphviz configuration was already migrated to the open beta model on
2021-04-07.² This means the macOS runner are no longer stateful:
To recap, for the closed beta, we provisioned a static macOS virtual machine
for each project. This meant that we executed any pipeline job in your
associated repository on the same virtual machine each time. Since the VM was
dedicated to your project, this also meant that your pipeline job did not have
to wait in a queue before running.
For the open-beta, each job that requires a macOS build environment will run
in its own ephemeral virtual machine provisioned on demand by the GitLab
Runner macOS autoscaler. This means that you can’t rely on persistent storage
anymore.
If we need -0.1 and -0.2 as floats (or the closest representation), we should
just say so. This improves the compiler’s ability to understand the intent of
this code.
Instead of being vague with ints, doubles, and floats, this commit standardizes
on float literals in hsv2rgb. This squashes a number of -Wfloat-conversion
compiler warnings.
use floating point math functions to squash a -Wfloat-conversion warning
The function sqrt operates on doubles, which was triggering a -Wfloat-conversion
compiler warning. The float version of this function is sqrtf, but we can
further abbreviate this operation by observing it is computing the hypotenuse of
a right-angled triangle and use the library function for that instead.
With -Wfloat-conversion, the compiler warns that going via double literals like
this resulted in an imprecise float. To squash this warning and be more precise,
we can use float literals instead.
remove use of double literals with ydelta in make_flat_labeled_edge
Commit ebe7517ae4eb86ee4bf34e1af31a174f1f0a4049 altered these lines to use
double literals instead of integer literals for `5` and `6`. It is not clear why
it did this as ydelta is an integer variable. The effect of that change was to
ask the compiler to perform the computation itself using doubles and then reduce
it to an integer result. This commit reverts that part of the diff to simply use
integer computation throughout. This change was motivated by the compiler
diagnosing this issue with -Wfloat-conversion.
squash a -Wfloat-conversion due to sqrt in distBetweenPts
There is a dedicated libc function for doing square root of floats, but this
code was incorrectly calling the version for doubles instead. This updated code
is more appropriate and could even be more efficient.
This change avoids some micro-optimizations that were unnecessary and making
this function harder to read. The function’s behavior is intended to be
identical after this change.
fix: remove dangling reference to textfont.* in Autotools file
The file textfont.c was renamed to textspan.c in 65f337664d177b588c5c2418fe12bac7eef62c2a but this rule was incorrectly not
updated. Rather than relying on manual dependencies which the Autotools docs
suggest can be problematic,¹ we just remove this rule. This removes the ability
to `make textspan.o`, but clearly no one was relying on this anyway as it has
been broken since 2013.
The Docker push jobs were depending on all prior jobs which was overly
restrictive. Each push job only needs the image it itself needs to push. Closes
#1988.
squash -Wshadow warning in Import_coord_clusters_from_dot
Similar to a prior change, there was a nested variable also called sz. By
removing this sz, we not only squash a compiler warning but make the code more
readable.
The iterations modified here are iterating over a collection whose size is
tracked using int fields, ngcells and ncells. Both these should really be size_t
but this is complicated to change at this point. As long as they are int, using
int loop counters provides greater consistency.
output source data for Linux downloads on the website during deployment
Commit 1b218752f5b6a1e661e158337fc1b976424fc6a0 of the website repository¹
changed how Linux downloads appear on the website to be driven by a JSON data
file. This commit updates the deployment script to produce this file for a
release as a CI job artifact. Related to #1979.