Use base::StringToInt() instead of std::stringstream
This commit is contained in:
parent
42f65c52fb
commit
7ec88d16a6
1 changed files with 2 additions and 4 deletions
|
@ -5,7 +5,6 @@
|
||||||
#include "atom/browser/web_contents_preferences.h"
|
#include "atom/browser/web_contents_preferences.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <sstream>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -225,11 +224,10 @@ bool WebContentsPreferences::ConvertValueToIntegerFromString(
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string stringValue;
|
base::string16 stringValue;
|
||||||
|
|
||||||
if (pref->web_preferences_.GetString(attributeName, &stringValue)) {
|
if (pref->web_preferences_.GetString(attributeName, &stringValue)) {
|
||||||
std::stringstream(stringValue) >> *intValue;
|
return base::StringToInt(stringValue, intValue);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue