diff options
Diffstat (limited to 'services/nuldoc/content/posts')
| -rw-r--r-- | services/nuldoc/content/posts/2021-10-02/cpp-you-can-use-keywords-in-attributes.md | 3 | ||||
| -rw-r--r-- | services/nuldoc/content/posts/2023-04-01/implementation-of-minimal-png-image-encoder.md | 18 |
2 files changed, 10 insertions, 11 deletions
diff --git a/services/nuldoc/content/posts/2021-10-02/cpp-you-can-use-keywords-in-attributes.md b/services/nuldoc/content/posts/2021-10-02/cpp-you-can-use-keywords-in-attributes.md index 70068754..fb8c8798 100644 --- a/services/nuldoc/content/posts/2021-10-02/cpp-you-can-use-keywords-in-attributes.md +++ b/services/nuldoc/content/posts/2021-10-02/cpp-you-can-use-keywords-in-attributes.md @@ -60,8 +60,7 @@ $ clang –std=c++17 hoge.cpp 別件で [cppreference.com の identifier のページ](https://en.cppreference.com/w/cpp/language/identifiers)を読んでいた時、次の文が目に止まった。 > * the identifiers that are keywords cannot be used for other purposes; -> -> * The only place they can be used as non-keywords is in an attribute-token. (e.g. [[private]] is a valid attribute) (since C++11) +> * The only place they can be used as non-keywords is in an attribute-token. (e.g. [[private]] is a valid attribute) (since C++11) キーワードでも属性として指定する場合は非キーワードとして使えるらしい。 実際にやってみる。 diff --git a/services/nuldoc/content/posts/2023-04-01/implementation-of-minimal-png-image-encoder.md b/services/nuldoc/content/posts/2023-04-01/implementation-of-minimal-png-image-encoder.md index 6f4fb3c8..2fd69590 100644 --- a/services/nuldoc/content/posts/2023-04-01/implementation-of-minimal-png-image-encoder.md +++ b/services/nuldoc/content/posts/2023-04-01/implementation-of-minimal-png-image-encoder.md @@ -189,19 +189,19 @@ IHDR chunk は最初に配置される chunk である。次のようなデー 1. 画像の幅 (符号なし 4 バイト整数) 1. 画像の高さ (符号なし 4 バイト整数) 1. ビット深度 (符号なし 1 バイト整数) - * 1 色に使うビット数。1 ピクセルに 24 bit 使う truecolor 画像では 8 になる + * 1 色に使うビット数。1 ピクセルに 24 bit 使う truecolor 画像では 8 になる 1. 色タイプ (符号なし 1 バイト整数) - * 0: グレースケール - * 2: Truecolor (今回はこれに決め打ち) - * 3: パレットのインデックス - * 4: グレースケール + アルファ - * 6: Truecolor + アルファ + * 0: グレースケール + * 2: Truecolor (今回はこれに決め打ち) + * 3: パレットのインデックス + * 4: グレースケール + アルファ + * 6: Truecolor + アルファ 1. 圧縮方式 (符号なし 1 バイト整数) - * PNG の仕様書に 0 しか定義されていないので 0 で固定 + * PNG の仕様書に 0 しか定義されていないので 0 で固定 1. フィルタ方式 (符号なし 1 バイト整数) - * PNG の仕様書に 0 しか定義されていないので 0 で固定 + * PNG の仕様書に 0 しか定義されていないので 0 で固定 1. インターレース方式 (符号なし 1 バイト整数) - * 今回はインターレースしないので 0 + * 今回はインターレースしないので 0 今回ほとんどのデータは決め打ちするので、データに応じて変わるのは width と height だけになる。コードは次のようになる。 |
