mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
general: Fix silly new clang warning about unprefixed std::move()
This commit is contained in:
parent
614502d183
commit
51d0a55264
@ -23,7 +23,6 @@
|
|||||||
using std::endl;
|
using std::endl;
|
||||||
using std::istream;
|
using std::istream;
|
||||||
using std::istringstream;
|
using std::istringstream;
|
||||||
using std::move;
|
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
@ -713,7 +712,7 @@ read(StreamReader &sr, bool want_server_info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse the header
|
// Parse the header
|
||||||
int num_multifiles = parse_header(Datagram(move(header)));
|
int num_multifiles = parse_header(Datagram(std::move(header)));
|
||||||
if (num_multifiles < 0) {
|
if (num_multifiles < 0) {
|
||||||
downloader_cat.error() << "invalid db header" << endl;
|
downloader_cat.error() << "invalid db header" << endl;
|
||||||
return false;
|
return false;
|
||||||
@ -733,7 +732,7 @@ read(StreamReader &sr, bool want_server_info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse the header
|
// Parse the header
|
||||||
int mfr_length = parse_record_header(Datagram(move(mfr_header)));
|
int mfr_length = parse_record_header(Datagram(std::move(mfr_header)));
|
||||||
|
|
||||||
// Ok, now that we know the size of the mfr, read it in Make a buffer to
|
// Ok, now that we know the size of the mfr, read it in Make a buffer to
|
||||||
// read the multifile record into do not count the header length twice
|
// read the multifile record into do not count the header length twice
|
||||||
@ -745,7 +744,7 @@ read(StreamReader &sr, bool want_server_info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse the mfr
|
// Parse the mfr
|
||||||
PT(DownloadDb::MultifileRecord) mfr = parse_mfr(Datagram(move(mfr_record)));
|
PT(DownloadDb::MultifileRecord) mfr = parse_mfr(Datagram(std::move(mfr_record)));
|
||||||
|
|
||||||
// Only read in the individual file info if you are the server
|
// Only read in the individual file info if you are the server
|
||||||
if (want_server_info) {
|
if (want_server_info) {
|
||||||
@ -764,7 +763,7 @@ read(StreamReader &sr, bool want_server_info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse the header
|
// Parse the header
|
||||||
int fr_length = parse_record_header(Datagram(move(fr_header)));
|
int fr_length = parse_record_header(Datagram(std::move(fr_header)));
|
||||||
|
|
||||||
// Ok, now that we know the size of the mfr, read it in do not count
|
// Ok, now that we know the size of the mfr, read it in do not count
|
||||||
// the header length twice
|
// the header length twice
|
||||||
@ -777,7 +776,7 @@ read(StreamReader &sr, bool want_server_info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse the file record
|
// Parse the file record
|
||||||
PT(DownloadDb::FileRecord) fr = parse_fr(Datagram(move(fr_record)));
|
PT(DownloadDb::FileRecord) fr = parse_fr(Datagram(std::move(fr_record)));
|
||||||
|
|
||||||
// Add this file record to the current multifilerecord
|
// Add this file record to the current multifilerecord
|
||||||
mfr->add_file_record(fr);
|
mfr->add_file_record(fr);
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
using std::max;
|
using std::max;
|
||||||
using std::min;
|
using std::min;
|
||||||
using std::move;
|
|
||||||
|
|
||||||
GeomVertexArrayFormat::Registry *GeomVertexArrayFormat::_registry = nullptr;
|
GeomVertexArrayFormat::Registry *GeomVertexArrayFormat::_registry = nullptr;
|
||||||
TypeHandle GeomVertexArrayFormat::_type_handle;
|
TypeHandle GeomVertexArrayFormat::_type_handle;
|
||||||
@ -56,7 +55,7 @@ GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
|
|||||||
_divisor(0),
|
_divisor(0),
|
||||||
_columns_unsorted(false)
|
_columns_unsorted(false)
|
||||||
{
|
{
|
||||||
add_column(move(name0), num_components0, numeric_type0, contents0);
|
add_column(std::move(name0), num_components0, numeric_type0, contents0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,8 +75,8 @@ GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
|
|||||||
_divisor(0),
|
_divisor(0),
|
||||||
_columns_unsorted(false)
|
_columns_unsorted(false)
|
||||||
{
|
{
|
||||||
add_column(move(name0), num_components0, numeric_type0, contents0);
|
add_column(std::move(name0), num_components0, numeric_type0, contents0);
|
||||||
add_column(move(name1), num_components1, numeric_type1, contents1);
|
add_column(std::move(name1), num_components1, numeric_type1, contents1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,9 +99,9 @@ GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
|
|||||||
_divisor(0),
|
_divisor(0),
|
||||||
_columns_unsorted(false)
|
_columns_unsorted(false)
|
||||||
{
|
{
|
||||||
add_column(move(name0), num_components0, numeric_type0, contents0);
|
add_column(std::move(name0), num_components0, numeric_type0, contents0);
|
||||||
add_column(move(name1), num_components1, numeric_type1, contents1);
|
add_column(std::move(name1), num_components1, numeric_type1, contents1);
|
||||||
add_column(move(name2), num_components2, numeric_type2, contents2);
|
add_column(std::move(name2), num_components2, numeric_type2, contents2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,10 +127,10 @@ GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
|
|||||||
_divisor(0),
|
_divisor(0),
|
||||||
_columns_unsorted(false)
|
_columns_unsorted(false)
|
||||||
{
|
{
|
||||||
add_column(move(name0), num_components0, numeric_type0, contents0);
|
add_column(std::move(name0), num_components0, numeric_type0, contents0);
|
||||||
add_column(move(name1), num_components1, numeric_type1, contents1);
|
add_column(std::move(name1), num_components1, numeric_type1, contents1);
|
||||||
add_column(move(name2), num_components2, numeric_type2, contents2);
|
add_column(std::move(name2), num_components2, numeric_type2, contents2);
|
||||||
add_column(move(name3), num_components3, numeric_type3, contents3);
|
add_column(std::move(name3), num_components3, numeric_type3, contents3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -223,7 +222,7 @@ add_column(CPT_InternalName name, int num_components,
|
|||||||
start = _total_bytes;
|
start = _total_bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
return add_column(GeomVertexColumn(move(name), num_components, numeric_type, contents,
|
return add_column(GeomVertexColumn(std::move(name), num_components, numeric_type, contents,
|
||||||
start, column_alignment));
|
start, column_alignment));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
using std::istream;
|
using std::istream;
|
||||||
using std::move;
|
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
using std::ostringstream;
|
using std::ostringstream;
|
||||||
using std::string;
|
using std::string;
|
||||||
@ -3475,7 +3474,7 @@ make(string body, ShaderLanguage lang) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ShaderFile sbody(move(body));
|
ShaderFile sbody(std::move(body));
|
||||||
|
|
||||||
if (cache_generated_shaders) {
|
if (cache_generated_shaders) {
|
||||||
ShaderTable::const_iterator i = _make_table.find(sbody);
|
ShaderTable::const_iterator i = _make_table.find(sbody);
|
||||||
@ -3535,8 +3534,8 @@ make(ShaderLanguage lang, string vertex, string fragment, string geometry,
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderFile sbody(move(vertex), move(fragment), move(geometry),
|
ShaderFile sbody(std::move(vertex), std::move(fragment), std::move(geometry),
|
||||||
move(tess_control), move(tess_evaluation));
|
std::move(tess_control), std::move(tess_evaluation));
|
||||||
|
|
||||||
if (cache_generated_shaders) {
|
if (cache_generated_shaders) {
|
||||||
ShaderTable::const_iterator i = _make_table.find(sbody);
|
ShaderTable::const_iterator i = _make_table.find(sbody);
|
||||||
@ -3580,7 +3579,7 @@ make_compute(ShaderLanguage lang, string body) {
|
|||||||
|
|
||||||
ShaderFile sbody;
|
ShaderFile sbody;
|
||||||
sbody._separate = true;
|
sbody._separate = true;
|
||||||
sbody._compute = move(body);
|
sbody._compute = std::move(body);
|
||||||
|
|
||||||
if (cache_generated_shaders) {
|
if (cache_generated_shaders) {
|
||||||
ShaderTable::const_iterator i = _make_table.find(sbody);
|
ShaderTable::const_iterator i = _make_table.find(sbody);
|
||||||
|
@ -74,7 +74,6 @@
|
|||||||
#include "weakNodePath.h"
|
#include "weakNodePath.h"
|
||||||
|
|
||||||
using std::max;
|
using std::max;
|
||||||
using std::move;
|
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
using std::ostringstream;
|
using std::ostringstream;
|
||||||
using std::string;
|
using std::string;
|
||||||
@ -3383,11 +3382,11 @@ set_shader_input(ShaderInput &&inp) {
|
|||||||
pnode->get_attrib(ShaderAttrib::get_class_slot());
|
pnode->get_attrib(ShaderAttrib::get_class_slot());
|
||||||
if (attrib != nullptr) {
|
if (attrib != nullptr) {
|
||||||
const ShaderAttrib *sa = (const ShaderAttrib *)attrib;
|
const ShaderAttrib *sa = (const ShaderAttrib *)attrib;
|
||||||
pnode->set_attrib(sa->set_shader_input(move(inp)));
|
pnode->set_attrib(sa->set_shader_input(std::move(inp)));
|
||||||
} else {
|
} else {
|
||||||
// Create a new ShaderAttrib for this node.
|
// Create a new ShaderAttrib for this node.
|
||||||
CPT(ShaderAttrib) sa = DCAST(ShaderAttrib, ShaderAttrib::make());
|
CPT(ShaderAttrib) sa = DCAST(ShaderAttrib, ShaderAttrib::make());
|
||||||
pnode->set_attrib(sa->set_shader_input(move(inp)));
|
pnode->set_attrib(sa->set_shader_input(std::move(inp)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5526,7 +5525,7 @@ calc_tight_bounds(LPoint3 &min_point, LPoint3 &max_point,
|
|||||||
|
|
||||||
bool found_any = false;
|
bool found_any = false;
|
||||||
node()->calc_tight_bounds(min_point, max_point, found_any,
|
node()->calc_tight_bounds(min_point, max_point, found_any,
|
||||||
move(transform), current_thread);
|
std::move(transform), current_thread);
|
||||||
|
|
||||||
return found_any;
|
return found_any;
|
||||||
}
|
}
|
||||||
@ -5826,7 +5825,7 @@ NodePath NodePath::
|
|||||||
decode_from_bam_stream(vector_uchar data, BamReader *reader) {
|
decode_from_bam_stream(vector_uchar data, BamReader *reader) {
|
||||||
NodePath result;
|
NodePath result;
|
||||||
|
|
||||||
DatagramBuffer buffer(move(data));
|
DatagramBuffer buffer(std::move(data));
|
||||||
|
|
||||||
BamReader local_reader;
|
BamReader local_reader;
|
||||||
if (reader == nullptr) {
|
if (reader == nullptr) {
|
||||||
|
@ -16,8 +16,6 @@
|
|||||||
#include "shaderInput_ext.h"
|
#include "shaderInput_ext.h"
|
||||||
#include "shaderAttrib.h"
|
#include "shaderAttrib.h"
|
||||||
|
|
||||||
using std::move;
|
|
||||||
|
|
||||||
#ifdef HAVE_PYTHON
|
#ifdef HAVE_PYTHON
|
||||||
|
|
||||||
#ifndef CPPPARSER
|
#ifndef CPPPARSER
|
||||||
@ -215,7 +213,7 @@ find_net_python_tag(PyObject *key) const {
|
|||||||
*/
|
*/
|
||||||
NodePath
|
NodePath
|
||||||
py_decode_NodePath_from_bam_stream(vector_uchar data) {
|
py_decode_NodePath_from_bam_stream(vector_uchar data) {
|
||||||
return py_decode_NodePath_from_bam_stream_persist(nullptr, move(data));
|
return py_decode_NodePath_from_bam_stream_persist(nullptr, std::move(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -235,7 +233,7 @@ py_decode_NodePath_from_bam_stream_persist(PyObject *unpickler, vector_uchar dat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NodePath::decode_from_bam_stream(move(data), reader);
|
return NodePath::decode_from_bam_stream(std::move(data), reader);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -253,7 +251,7 @@ set_shader_input(CPT_InternalName name, PyObject *value, int priority) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ShaderInput &input = attrib->_inputs[name];
|
ShaderInput &input = attrib->_inputs[name];
|
||||||
invoke_extension(&input).__init__(move(name), value, priority);
|
invoke_extension(&input).__init__(std::move(name), value, priority);
|
||||||
|
|
||||||
if (!_PyErr_OCCURRED()) {
|
if (!_PyErr_OCCURRED()) {
|
||||||
node->set_attrib(ShaderAttrib::return_new(attrib));
|
node->set_attrib(ShaderAttrib::return_new(attrib));
|
||||||
@ -298,7 +296,7 @@ set_shader_inputs(PyObject *args, PyObject *kwargs) {
|
|||||||
|
|
||||||
CPT_InternalName name(std::string(buffer, length));
|
CPT_InternalName name(std::string(buffer, length));
|
||||||
ShaderInput &input = attrib->_inputs[name];
|
ShaderInput &input = attrib->_inputs[name];
|
||||||
invoke_extension(&input).__init__(move(name), value);
|
invoke_extension(&input).__init__(std::move(name), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_PyErr_OCCURRED()) {
|
if (!_PyErr_OCCURRED()) {
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
|
|
||||||
using std::max;
|
using std::max;
|
||||||
using std::min;
|
using std::min;
|
||||||
using std::move;
|
|
||||||
using std::wstring;
|
using std::wstring;
|
||||||
|
|
||||||
// This is the factor by which CT_small scales the character down.
|
// This is the factor by which CT_small scales the character down.
|
||||||
@ -1197,7 +1196,7 @@ generate_quads(GeomNode *geom_node, const QuadMap &quad_map) {
|
|||||||
tex_ptr[1] = quad._uvs[1];
|
tex_ptr[1] = quad._uvs[1];
|
||||||
tex_ptr += stride;
|
tex_ptr += stride;
|
||||||
|
|
||||||
glyphs.push_back(move(quad._glyph));
|
glyphs.push_back(std::move(quad._glyph));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 64-bit vertex case.
|
// 64-bit vertex case.
|
||||||
@ -1245,7 +1244,7 @@ generate_quads(GeomNode *geom_node, const QuadMap &quad_map) {
|
|||||||
tex_ptr[1] = quad._uvs[1];
|
tex_ptr[1] = quad._uvs[1];
|
||||||
tex_ptr += stride;
|
tex_ptr += stride;
|
||||||
|
|
||||||
glyphs.push_back(move(quad._glyph));
|
glyphs.push_back(std::move(quad._glyph));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1751,7 +1750,7 @@ shape_buffer(hb_buffer_t *buf, PlacedGlyphs &placed_glyphs, PN_stdfloat &xpos,
|
|||||||
// it may involve multiple Geoms if we need to add cheesy accents or
|
// it may involve multiple Geoms if we need to add cheesy accents or
|
||||||
// ligatures.
|
// ligatures.
|
||||||
GlyphPlacement placement;
|
GlyphPlacement placement;
|
||||||
placement._glyph = move(glyph);
|
placement._glyph = std::move(glyph);
|
||||||
placement._scale = glyph_scale;
|
placement._scale = glyph_scale;
|
||||||
placement._xpos = xpos + x_offset;
|
placement._xpos = xpos + x_offset;
|
||||||
placement._ypos = properties.get_glyph_shift() + y_offset;
|
placement._ypos = properties.get_glyph_shift() + y_offset;
|
||||||
@ -1801,7 +1800,7 @@ draw_underscore(TextAssembler::PlacedGlyphs &placed_glyphs,
|
|||||||
// LVecBase4(0), RenderState::make_empty());
|
// LVecBase4(0), RenderState::make_empty());
|
||||||
|
|
||||||
GlyphPlacement placement;
|
GlyphPlacement placement;
|
||||||
placement._glyph = move(glyph);
|
placement._glyph = std::move(glyph);
|
||||||
placement._xpos = 0;
|
placement._xpos = 0;
|
||||||
placement._ypos = 0;
|
placement._ypos = 0;
|
||||||
placement._scale = 1;
|
placement._scale = 1;
|
||||||
@ -2458,7 +2457,7 @@ assign_quad_to(QuadMap &quad_map, const RenderState *state,
|
|||||||
quad._dimensions += LVecBase4(offset[0], -offset[1], offset[0], -offset[1]);
|
quad._dimensions += LVecBase4(offset[0], -offset[1], offset[0], -offset[1]);
|
||||||
quad._glyph = _glyph;
|
quad._glyph = _glyph;
|
||||||
|
|
||||||
quad_map[state->compose(_glyph->get_state())].push_back(move(quad));
|
quad_map[state->compose(_glyph->get_state())].push_back(std::move(quad));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user