diff options
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy/checks/misc-string-integer-assignment.rst')
-rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/misc-string-integer-assignment.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-string-integer-assignment.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-string-integer-assignment.rst index 285702eae5b..d882e8d0d9d 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/misc-string-integer-assignment.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/misc-string-integer-assignment.rst @@ -7,13 +7,13 @@ The check finds assignments of an integer to ``std::basic_string<CharT>`` (``std::string``, ``std::wstring``, etc.). The source of the problem is the following assignment operator of ``std::basic_string<CharT>``: -.. code:: c++ +.. code-block:: c++ basic_string& operator=( CharT ch ); Numeric types can be implicitly casted to character types. -.. code:: c++ +.. code-block:: c++ std::string s; int x = 5965; @@ -22,7 +22,7 @@ Numeric types can be implicitly casted to character types. Use the appropriate conversion functions or character literals. -.. code:: c++ +.. code-block:: c++ std::string s; int x = 5965; @@ -31,7 +31,7 @@ Use the appropriate conversion functions or character literals. In order to suppress false positives, use an explicit cast. -.. code:: c++ +.. code-block:: c++ std::string s; s = static_cast<char>(6); |