mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-25 19:30:50 +00:00
remove mapped_file nullptr if readonly stuff. it causes nothing but headaches.
This commit is contained in:
parent
3db689389e
commit
e61a54d0cf
@ -95,7 +95,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
value_type *data() {
|
value_type *data() {
|
||||||
return _flags == readonly ? (value_type *)nullptr : (value_type *)_data;
|
return (value_type *)_data;
|
||||||
|
//return _flags == readonly ? (value_type *)nullptr : (value_type *)_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
const_iterator cbegin() const {
|
const_iterator cbegin() const {
|
||||||
@ -116,11 +117,13 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
iterator begin() {
|
iterator begin() {
|
||||||
return _flags == readonly ? (iterator)nullptr : (iterator)_data;
|
return (iterator)_data;
|
||||||
|
//return _flags == readonly ? (iterator)nullptr : (iterator)_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator end() {
|
iterator end() {
|
||||||
return _flags == readonly ? (iterator)nullptr : (iterator)_data + size();
|
return (iterator)_data + size();
|
||||||
|
//return _flags == readonly ? (iterator)nullptr : (iterator)_data + size();
|
||||||
}
|
}
|
||||||
|
|
||||||
mapmode flags() const {
|
mapmode flags() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user