mirror of
https://github.com/electron/electron.git
synced 2026-01-26 15:58:07 -05:00
Use base::StringToInt() instead of std::stringstream
This commit is contained in:
committed by
Kevin Sawicki
parent
42f65c52fb
commit
7ec88d16a6
@@ -5,7 +5,6 @@
|
||||
#include "atom/browser/web_contents_preferences.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -225,11 +224,10 @@ bool WebContentsPreferences::ConvertValueToIntegerFromString(
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string stringValue;
|
||||
base::string16 stringValue;
|
||||
|
||||
if (pref->web_preferences_.GetString(attributeName, &stringValue)) {
|
||||
std::stringstream(stringValue) >> *intValue;
|
||||
return true;
|
||||
return base::StringToInt(stringValue, intValue);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user