From 76d9e2678d98ff14a02fc5802d300676148eabac Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Tue, 14 May 2024 14:33:51 +0900 Subject: [PATCH] Fix svace issue (Setup initialize values for GlyphRun and LineRun struct) Change-Id: Ib1fc67360b9b5990e417273c69f6115455a9cdf4 Signed-off-by: Eunki, Hong --- dali-toolkit/internal/text/glyph-run.h | 6 +++--- dali-toolkit/internal/text/line-run.h | 28 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dali-toolkit/internal/text/glyph-run.h b/dali-toolkit/internal/text/glyph-run.h index 5328af1f53..21d9f31715 100644 --- a/dali-toolkit/internal/text/glyph-run.h +++ b/dali-toolkit/internal/text/glyph-run.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_GLYPH_RUN_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,8 +32,8 @@ namespace Text */ struct GlyphRun { - GlyphIndex glyphIndex; ///< Index to the first glyph. - Length numberOfGlyphs; ///< Number of glyphs in the run. + GlyphIndex glyphIndex{0u}; ///< Index to the first glyph. + Length numberOfGlyphs{0u}; ///< Number of glyphs in the run. }; } // namespace Text diff --git a/dali-toolkit/internal/text/line-run.h b/dali-toolkit/internal/text/line-run.h index 5d5b28bf60..12f3820385 100644 --- a/dali-toolkit/internal/text/line-run.h +++ b/dali-toolkit/internal/text/line-run.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_LINE_RUN_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,19 +33,19 @@ namespace Text */ struct LineRun { - GlyphRun glyphRun; ///< The initial glyph index and the number of glyphs of the run. - CharacterRun characterRun; ///< The initial character index and the number of characters of the run. - float width; ///< The line's width. - float ascender; ///< The line's ascender. - float descender; ///< The line's descender. - float extraLength; ///< The length of the white spaces at the end of the line. - float alignmentOffset; ///< The horizontal alignment offset. - float lineSpacing; ///< The line's spacing - CharacterDirection direction : 1; ///< Direction of the first character of the paragraph. - bool ellipsis : 1; ///< Wheter ellipsis is added to the line. - bool isSplitToTwoHalves; ///< Whether the second half is defined. When split line to two halves to set Ellipsis in the MIDDLE of line. The second half is the second part of line after Ellipsis. - GlyphRun glyphRunSecondHalf; ///< The initial glyph index and the number of glyphs of the run for the second half of line. - CharacterRun characterRunForSecondHalfLine; ///< The initial character index and the number of characters of the run for the second half of line. + GlyphRun glyphRun{}; ///< The initial glyph index and the number of glyphs of the run. + CharacterRun characterRun{}; ///< The initial character index and the number of characters of the run. + float width; ///< The line's width. + float ascender; ///< The line's ascender. + float descender; ///< The line's descender. + float extraLength; ///< The length of the white spaces at the end of the line. + float alignmentOffset; ///< The horizontal alignment offset. + float lineSpacing; ///< The line's spacing + CharacterDirection direction : 1; ///< Direction of the first character of the paragraph. + bool ellipsis : 1; ///< Wheter ellipsis is added to the line. + bool isSplitToTwoHalves; ///< Whether the second half is defined. When split line to two halves to set Ellipsis in the MIDDLE of line. The second half is the second part of line after Ellipsis. + GlyphRun glyphRunSecondHalf{}; ///< The initial glyph index and the number of glyphs of the run for the second half of line. + CharacterRun characterRunForSecondHalfLine{}; ///< The initial character index and the number of characters of the run for the second half of line. }; /** -- 2.34.1