0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

c++ builder > AnsiString をUnicodeStringに変えてはまった

Last updated at Posted at 2015-09-21
動作確認
C++ Builder XE4

ソフトの修正の中でよけいなことをやってはまった話。

AnsiString xxx = ...

という宣言で処理していたのを、以下のようにした。

String xxx = ...

その変数xxxについては、そのLengthにかかわる処理にマジックナンバーが入っていたため、関連処理が動かなくなった。

そもそもAnsiString型から変更したのが間違いだったかもしれない。

AnsiString型、UnicodeString型混在を避ける場合は、関連処理をテストできるようにした上で修正した方がいいだろう。

VCSで履歴があったので10分程度でわかったが、VCSを使ってなかったらかなりはまったかもしれない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?