8000 Cleanup mscgen by gruenich · Pull Request #11605 · doxygen/doxygen · GitHub
[go: up one dir, main page]

Skip to content

Cleanup mscgen #11605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 8, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[mscgen] Declared some variables as pointer to const
Found by Cppcheck (constVariablePointer)
  • Loading branch information
gruenich committed Jun 7, 2025
commit df652b4d540dc18db42c0cc67740cce9a48486e2
2 changes: 1 addition & 1 deletion deps/libmscgen/gd_lodepng.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BGD_DECLARE(void) gdImagePng (gdImagePtr im, FILE * outFile)
int *pThisRow = *ptpixels++;
for (x=0;x<im->sx;x++)
{
int thisPixel = *pThisRow++;
const int thisPixel = *pThisRow++;
*pOut++ = gdTrueColorGetRed(thisPixel);
*pOut++ = gdTrueColorGetGreen(thisPixel);
*pOut++ = gdTrueColorGetBlue(thisPixel);
Expand Down
2 changes: 1 addition & 1 deletion deps/libmscgen/mscgen_gd_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void gdoTextR(struct ADrawTag *ctx,
unsigned int y,
const char *string)
{
GdoContext *context = getGdoCtx(ctx);
const GdoContext *context = getGdoCtx(ctx);
#ifdef USE_FREETYPE
int rect[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
const char *r;
Expand Down
2 changes: 1 addition & 1 deletion deps/libmscgen/mscgen_msc.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ const char *MscGetCurrentArcAttrib(struct MscTag *m, MscAttribType a)

Boolean MscGetOptAsFloat(struct MscTag *m, MscOptType type, float *const f)
{
struct MscOptTag *opt = MscFindOpt(m->optList, type);
const struct MscOptTag *opt = MscFindOpt(m->optList, type);

if(opt != NULL)
{
Expand Down
6 changes: 3 additions & 3 deletions deps/libmscgen/mscgen_ps_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void PsTextR(struct ADrawTag *ctx,
unsigned int y,
const char *string)
{
PsContext *context = getPsCtx(ctx);
const PsContext *context = getPsCtx(ctx);

/* Push the string and get its width */
fprintf(getPsFile(ctx), "(");
Expand Down Expand Up @@ -300,7 +300,7 @@ void PsTextL(struct ADrawTag *ctx,
unsigned int y,
const char *string)
{
PsContext *context = getPsCtx(ctx);
const PsContext *context = getPsCtx(ctx);

/* Draw the background box */
setColour(ctx, context->penBgColour);
Expand All @@ -327,7 +327,7 @@ void PsTextC(struct ADrawTag *ctx,
unsigned int y,
const char *string)
{
PsContext *context = getPsCtx(ctx);
const PsContext *context = getPsCtx(ctx);

/* Push the string and get its width */
fprintf(getPsFile(ctx), "(");
Expand Down
6 changes: 3 additions & 3 deletions deps/libmscgen/mscgen_svg_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void SvgTextR(struct ADrawTag *ctx,
unsigned int y,
const char *string)
{
SvgContext *context = getSvgCtx(ctx);
const SvgContext *context = getSvgCtx(ctx);

svgRect(ctx, getSvgBgPen(ctx), x - 2, y - SvgTextHeight(ctx) + 1, x + SvgTextWidth(ctx, string), y - 1);

Expand All @@ -320,7 +320,7 @@ void SvgTextL(struct ADrawTag *ctx,
unsigned int y,
const char *string)
{
SvgContext *context = getSvgCtx(ctx);
const SvgContext *context = getSvgCtx(ctx);

svgRect(ctx, getSvgBgPen(ctx), x - (SvgTextWidth(ctx, string) + 2), y - SvgTextHeight(ctx) + 1, x, y - 1);

Expand All @@ -341,7 +341,7 @@ void SvgTextC(struct ADrawTag *ctx,
unsigned int y,
const char *string)
{
SvgContext *context = getSvgCtx(ctx);
const SvgContext *context = getSvgCtx(ctx);
unsigned int hw = SvgTextWidth(ctx, string) / 2;

svgRect(ctx, getSvgBgPen(ctx), x - (hw + 2), y - SvgTextHeight(ctx) + 1, x + hw, y - 1);
Expand Down
0