mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Do not leave variables without initialization, even in execution paths where they are unused
This commit is contained in:
parent
9647b670e4
commit
651ad11ad8
4 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ namespace MWDialogue
|
||||||
std::vector<Token> parseHyperText(const std::string & text)
|
std::vector<Token> parseHyperText(const std::string & text)
|
||||||
{
|
{
|
||||||
std::vector<Token> result;
|
std::vector<Token> result;
|
||||||
size_t pos_end, iteration_pos = 0;
|
size_t pos_end = std::string::npos, iteration_pos = 0;
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
size_t pos_begin = text.find('@', iteration_pos);
|
size_t pos_begin = text.find('@', iteration_pos);
|
||||||
|
|
|
@ -148,7 +148,7 @@ namespace MWGui
|
||||||
// We need this copy for when @# hyperlinks are replaced
|
// We need this copy for when @# hyperlinks are replaced
|
||||||
std::string text = mText;
|
std::string text = mText;
|
||||||
|
|
||||||
size_t pos_end;
|
size_t pos_end = std::string::npos;
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
size_t pos_begin = text.find('@');
|
size_t pos_begin = text.find('@');
|
||||||
|
|
|
@ -129,7 +129,7 @@ struct JournalViewModelImpl : JournalViewModel
|
||||||
|
|
||||||
utf8text.replace(pos_begin, pos_end+1-pos_begin, displayName);
|
utf8text.replace(pos_begin, pos_end+1-pos_begin, displayName);
|
||||||
|
|
||||||
intptr_t value;
|
intptr_t value = 0;
|
||||||
if (mModel->mKeywordSearch.containsKeyword(topicName, value))
|
if (mModel->mKeywordSearch.containsKeyword(topicName, value))
|
||||||
mHyperLinks[std::make_pair(pos_begin, pos_begin+displayName.size())] = value;
|
mHyperLinks[std::make_pair(pos_begin, pos_begin+displayName.size())] = value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace MWPhysics
|
||||||
// attempt 3: further, less tall fixed distance movement, same as above
|
// attempt 3: further, less tall fixed distance movement, same as above
|
||||||
// If you're making a full conversion you should purge the logic for attempts 2 and 3. Attempts 2 and 3 just try to work around problems with vanilla Morrowind assets.
|
// If you're making a full conversion you should purge the logic for attempts 2 and 3. Attempts 2 and 3 just try to work around problems with vanilla Morrowind assets.
|
||||||
int attempt = 0;
|
int attempt = 0;
|
||||||
float downStepSize;
|
float downStepSize = 0;
|
||||||
while(attempt < 3)
|
while(attempt < 3)
|
||||||
{
|
{
|
||||||
attempt++;
|
attempt++;
|
||||||
|
|
Loading…
Reference in a new issue