File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -149,25 +149,28 @@ void LanguageServer::changeConfiguration(Json::Value const& _settings)
149
149
{
150
150
m_settingsObject = _settings;
151
151
Json::Value jsonIncludePaths = _settings[" include-paths" ];
152
- int typeFailureCount = 0 ;
153
152
154
- if (jsonIncludePaths && jsonIncludePaths. isArray () )
153
+ if (jsonIncludePaths)
155
154
{
156
- vector<boost::filesystem::path> includePaths ;
157
- for (Json::Value const & jsonPath: jsonIncludePaths)
155
+ int typeFailureCount = 0 ;
156
+ if ( jsonIncludePaths. isArray () )
158
157
{
159
- if (jsonPath.isString ())
160
- includePaths.emplace_back (boost::filesystem::path (jsonPath.asString ()));
161
- else
162
- typeFailureCount++;
158
+ vector<boost::filesystem::path> includePaths;
159
+ for (Json::Value const & jsonPath: jsonIncludePaths)
160
+ {
161
+ if (jsonPath.isString ())
162
+ includePaths.emplace_back (boost::filesystem::path (jsonPath.asString ()));
163
+ else
164
+ typeFailureCount++;
165
+ }
166
+ m_fileRepository.setIncludePaths (move (includePaths));
163
167
}
164
- m_fileRepository.setIncludePaths (move (includePaths));
165
- }
166
- else
167
- ++typeFailureCount;
168
+ else
169
+ ++typeFailureCount;
168
170
169
- if (typeFailureCount)
170
- m_client.trace (" Invalid JSON configuration passed. \" include-paths\" must be an array of strings." );
171
+ if (typeFailureCount)
172
+ m_client.trace (" Invalid JSON configuration passed. \" include-paths\" must be an array of strings." );
173
+ }
171
174
}
172
175
173
176
void LanguageServer::compile ()
You can’t perform that action at this time.
0 commit comments