17 Commits

Author SHA1 Message Date
Niclas Antti
c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
Johan Wikman
cb6096f84d Provide std::default_delete<GWBUF*>
Now GWBUFs can be placed in std::unique_ptr:s.
2018-08-27 14:20:36 +03:00
Johan Wikman
ab9a9f92cb MXS-2020 Remove maxscale/debug.h
- Removed from all files.
- maxbase/assert.h included where necessary.
2018-08-22 11:35:35 +03:00
Johan Wikman
3f53eddbde MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message] 2018-08-22 11:34:59 +03:00
Niclas Antti
24ab3c099c Move top of the file "#pragma once" to after the following comment (swap them). If the comment is a BPL update it to the latest one 2018-08-21 13:13:15 +03:00
Johan Wikman
f14380243b Rename cppdefs.hh to ccdefs.hh
For obvious reasons; the c++ suffix is .cc and not .cpp
2018-08-10 07:50:18 +03:00
Johan Wikman
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
Markus Mäkelä
a61c9cfdfa
Make assignment operator unambiguous
Copying a std::deque<mxs::Buffer> would cause a compilation failure due to
ambiguity between the copy-assignment and move-assignment
operators. Explicitly constructing a temporary object retains the strong
exception guarantee but prevents the ambiguity.
2018-04-20 10:24:00 +03:00
Markus Mäkelä
23aa9cc492
Add Buffer::copy_from(GWBUF*)
This makes it easier to create a Buffer from GWBUF that the API functions
pass as arguments.
2018-04-10 15:32:23 +03:00
Markus Mäkelä
f06b2b5ab9
Fix mxs::Buffer::copy_from
The code failed to compile when the function is used with a warning that
`pBuffer` was used without initialization. This makes sense as the first
conditional block re-declares the same parameter.
2018-04-10 15:32:22 +03:00
Markus Mäkelä
e90c29cce2
MXS-1702: Clean up and convert test to C++
Cleaned up and updated the test; the code was written with a pre-C99
standard in mind.

Added a get() method into mxs::Buffer to make it easier to use with
non-C++ functions.
2018-03-20 13:53:54 +02:00
Johan Wikman
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
Johan Wikman
5648f708af Update license to BSL 1.1 2017-02-14 21:42:28 +02:00
Markus Mäkelä
0b6b9c3d81 Format core source code and headers
Formatted core source code and headers with Astyle.
2017-01-17 14:47:50 +02:00
Johan Wikman
75c257327e Fix G++ 4.4 issue
G++ 4.4 on CentOS6 seems to get confused by direct inheritance
from templates. Worked around by introducing typedef.
2017-01-09 13:17:49 +02:00
Johan Wikman
171eb3f690 Provide backdoor to Buffer::iterator 2017-01-09 09:19:59 +02:00
Johan Wikman
cb0cb4bb09 Add maxscale::Buffer
maxscale::Buffer is a simple C++ wrapper around GWBUF that allows the
latter to be manipulated like an STL compatible collection.
maxscale::Buffer provides both a const and non-const forward iterator,
using which a non-contiguous GWBUF can be traversed and manipulated.
The iterators can be used with any standard C++ algorithm that accepts
forward iterators.
2016-12-29 11:50:42 +02:00