J'ai une erreur en compilation à cette ligne ici.
buffer.assign(getData(), getData() + getDataSize());
Il me marque ça :
/usr/Projets/SorrokSrv/NetworkEngine/encryptedPacket.h|9|warning: deprecated covariant return type for ‘virtual const char* EncryptedPacket::onSend(std::size_t&)’ [enabled by default]|
/usr/local/include/SFML/Network/Packet.hpp|234|warning: overriding ‘virtual const void* sf::Packet::onSend(std::size_t&)’ [enabled by default]|
/usr/Projets/SorrokSrv/NetworkEngine/encryptedPacket.cpp||In member function ‘virtual const char* EncryptedPacket::onSend(size_t&)’:|
/usr/Projets/SorrokSrv/NetworkEngine/encryptedPacket.cpp|8|warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]|
/usr/Projets/SorrokSrv/NetworkEngine/encryptedPacket.cpp||In member function ‘virtual void EncryptedPacket::onReceive(const char*, size_t)’:|
/usr/Projets/SorrokSrv/NetworkEngine/encryptedPacket.cpp|30|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
/usr/include/c++/4.6/bits/stl_vector.h:1159|24|instantiated from ‘void std::vector<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator, _InputIterator, std::__false_type) [with _InputIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/include/c++/4.6/bits/stl_vector.h:433|4|instantiated from ‘void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/Projets/SorrokSrv/NetworkEngine/encryptedPacket.cpp:8|55|instantiated from here|
/usr/include/c++/4.6/bits/stl_iterator_base_types.h|193|error: forming reference to void|
/usr/include/c++/4.6/bits/stl_iterator_base_funcs.h||In function ‘typename std::iterator_traits<_Iterator>::difference_type std::__distance(_RandomAccessIterator, _RandomAccessIterator, std::random_access_iterator_tag) [with _RandomAccessIterator = const void*, typename std::iterator_traits<_Iterator>::difference_type = long int]’:|
/usr/include/c++/4.6/bits/stl_iterator_base_funcs.h:117|42|instantiated from ‘typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator) [with _InputIterator = const void*, typename std::iterator_traits<_Iterator>::difference_type = long int]’|
/usr/include/c++/4.6/bits/vector.tcc:241|55|instantiated from ‘void std::vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/include/c++/4.6/bits/stl_vector.h:1160|4|instantiated from ‘void std::vector<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator, _InputIterator, std::__false_type) [with _InputIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/include/c++/4.6/bits/stl_vector.h:433|4|instantiated from ‘void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/Projets/SorrokSrv/NetworkEngine/encryptedPacket.cpp:8|55|instantiated from here|
/usr/include/c++/4.6/bits/stl_iterator_base_funcs.h|96|error: invalid use of ‘const void’|
/usr/include/c++/4.6/bits/stl_uninitialized.h:119|41|instantiated from ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const void*, _ForwardIterator = char*]’|
/usr/include/c++/4.6/bits/stl_uninitialized.h:259|63|instantiated from ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = const void*, _ForwardIterator = char*, _Tp = char]’|
/usr/include/c++/4.6/bits/vector.tcc:262|6|instantiated from ‘void std::vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/include/c++/4.6/bits/stl_vector.h:1160|4|instantiated from ‘void std::vector<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator, _InputIterator, std::__false_type) [with _InputIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/include/c++/4.6/bits/stl_vector.h:433|4|instantiated from ‘void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/Projets/SorrokSrv/NetworkEngine/encryptedPacket.cpp:8|55|instantiated from here|
/usr/include/c++/4.6/bits/stl_uninitialized.h|76|error: ISO C++ forbids incrementing a pointer of type ‘const void*’ [-fpermissive]|
/usr/include/c++/4.6/bits/stl_uninitialized.h:119|41|instantiated from ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const void*, _ForwardIterator = char*]’|
/usr/include/c++/4.6/bits/stl_uninitialized.h:259|63|instantiated from ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = const void*, _ForwardIterator = char*, _Tp = char]’|
/usr/include/c++/4.6/bits/vector.tcc:262|6|instantiated from ‘void std::vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/include/c++/4.6/bits/stl_vector.h:1160|4|instantiated from ‘void std::vector<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator, _InputIterator, std::__false_type) [with _InputIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/include/c++/4.6/bits/stl_vector.h:433|4|instantiated from ‘void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/Projets/SorrokSrv/NetworkEngine/encryptedPacket.cpp:8|55|instantiated from here|
/usr/include/c++/4.6/bits/stl_uninitialized.h|77|error: ‘const void*’ is not a pointer-to-object type|
/usr/include/c++/4.6/bits/stl_algobase.h:384|70|instantiated from ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false, _II = const void*, _OI = char*]’|
/usr/include/c++/4.6/bits/stl_algobase.h:422|39|instantiated from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false, _II = const void*, _OI = char*]’|
/usr/include/c++/4.6/bits/stl_algobase.h:454|18|instantiated from ‘_OI std::copy(_II, _II, _OI) [with _II = const void*, _OI = char*]’|
/usr/include/c++/4.6/bits/vector.tcc:256|4|instantiated from ‘void std::vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/include/c++/4.6/bits/stl_vector.h:1160|4|instantiated from ‘void std::vector<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator, _InputIterator, std::__false_type) [with _InputIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/include/c++/4.6/bits/stl_vector.h:433|4|instantiated from ‘void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = const void*, _Tp = char, _Alloc = std::allocator<char>]’|
/usr/Projets/SorrokSrv/NetworkEngine/encryptedPacket.cpp:8|55|instantiated from here|
/usr/include/c++/4.6/bits/stl_algobase.h|327|error: invalid use of ‘const void’|
/usr/include/c++/4.6/bits/stl_algobase.h|329|error: ‘const void*’ is not a pointer-to-object type|
/usr/include/c++/4.6/bits/stl_algobase.h|330|error: ISO C++ forbids incrementing a pointer of type ‘const void*’ [-fpermissive]|
||=== Build finished: 7 errors, 4 warnings ===|
Hors que avec la SFML 1.6 ça marchait nickel.