sergei-mironov / xkb-switch

Switch your X keyboard layouts from the command line
MIT License
345 stars 37 forks source link

Error compilling 'XKeyboard.cpp': istringstream '=' operator is 'deleted' #35

Closed alexandersolovyov closed 5 years ago

alexandersolovyov commented 5 years ago

I have an error when compiling XKeyboard.cpp file, using gcc compiler with option -std=gnu++11. It says that '=' operator for istringstream is deleted. From documentation, it seems that Copy operator is deleted. Maybe it's better to use stringstream with operator << instead?

sergei-mironov commented 5 years ago

I removed this code, should be more idiomatic now.

alexandersolovyov commented 5 years ago

It looks better. But why not cleaning 'vdr' now? May there be a memory leak?

zvezdochiot commented 5 years ago

@alexandersolovyov say> May there be a memory leak?

$ cppcheck -f -v . 2>cppcheck.log >/dev/null
$ wc -l cppcheck.log 
0 cppcheck.log
alexandersolovyov commented 5 years ago

Zvezdochiot, thanks for this 'cppcheck' command. It looks like all Ok. I didn't see wrapper class... Sorry for my inattention.

sergei-mironov commented 5 years ago

¯_(ツ)_/¯